linux/fs/hpfs/hpfs_fn.h
<<
ion .14/spa> .14/form .14a ion .1 href="../linux+v3.9.6/fs/hpfs/hpfs_fn.h">ion .14img src="../.static/gfx/right.png" alt=">>">io4/spa> io4spa> class="lxr_search">ion ="+search" method="post" onsubmit="return do_search(this);">ion .14input typ> hidden" nam> navtarget" tion> ">ion .14input typ> text" nam> search" id search">ion .14butt/optyp> submit">Search io4spa> class="lxr_prefs" .14a href="+prefs?return=fs/hpfs/hpfs_fn.h"ion .1 onclick="return ajax_prefs();">ion .1Prefs .14/a>io4/spa> n .1 14/div n .1 14form ac >="ajax+*" method="post" onsubmit="return false;">io4input typ> hidden" nam> ajax_lookup" id ajax_lookup" tion> ">in .1 14/form in .1 14div class="headingbott/m">
4div id file_contents"
 L1">1 114/a>4spa> class="comment">/*4/spa>
 
 L2">1 124/a>4spa> class="comment"> *  linux/fs/hpfs/hpfs_fn.h4/spa>
 
 L3">1 134/a>4spa> class="comment"> *4/spa>
 
 L4">1 144/a>4spa> class="comment"> *  Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz), 1998-19994/spa>
 
 L5">1 154/a>4spa> class="comment"> *4/spa>
 
 L6">1 164/a>4spa> class="comment"> *  func	  > headers4/spa>
 
 L7">1 174/a>4spa> class="comment"> */4/spa>
 
 L8">1 184/a>i
 L9">1 194/a>4spa> class="comment">//#define DBG4/spa>
 
 L10">1 8.10a>4spa> class="comment">//#define DEBUG_LOCKS4/spa>
 
 L11">1 114/a>i
 L12">1 124/a>#include <linux/mutex.h4/a>>i
 L13">1 134/a>#include <linux/pagemap.h4/a>>i
 L14">1 144/a>#include <linux/buffer_head.h4/a>>i
 L15">1 154/a>#include <linux/slab.h4/a>>i
 L16">1 164/a>#include <asm/unaligned.h4/a>>i
 L17">1 174/a>i
 L18">1 184/a>#include "hpfs.h4/a>"i
 L19">1 194/a>i
 L20">1 2.10a>#define EIOERROR10a>  EIO4/a>i
 L21">1 2110a>#define EFSERROR10a>  EPERM4/a>i
 L22">1 2210a>#define EMEMERROR10a> ENOMEM4/a>i
 L23">1 234/a>i
 L24">1 2410a>#define ANODE_ALLOC_FWD10a> 512i
 L25">1 2510a>#define FNODE_ALLOC_FWD10a> 0i
 L26">1 2610a>#define ALLOC_FWD_MIN10a>   16i
 L27">1 2710a>#define ALLOC_FWD_MAX10a>   128i
 L28">1 2810a>#define ALLOC_M10a>         1i
 L29">1 2910a>#define FNODE_RD_AHEAD10a>  16i
 L30">1 3.10a>#define ANODE_RD_AHEAD10a>  16i
 L31">1 3110a>#define DNODE_RD_AHEAD10a>  4i
 L32">1 324/a>i
 L33">1 3310a>#define FREE_DNODES_ADD10a> 58i
 L34">1 3410a>#define FREE_DNODES_DEL10a> 29i
 L35">1 354/a>i
 L36">1 3610a>#define CHKCOND10a>(x10a>,y10a>) if (!(x10a>)) printk10a> y10a>i
 L37">1 374/a>i
 L38">1 3810a>struct hpfs_inode_info10a> {i
 L39">1 3910a>        loff_t10a> mmu_private10a>;i
 L40">1 4010a>        ino_t10a> i_parent_dir10a>;      class="comment">/* (directories) gives fnode of parent dir */4/spa>
 
 L41">1 4110a>        unsigned i_dno10a>;          class="comment">/* (directories) root dnode */4/spa>
 
 L42">1 4210a>        unsigned i_dpos10a>;         class="comment">/* (directories) temp for readdir */4/spa>
 
 L43">1 4310a>        unsigned i_dsubdno10a>;      class="comment">/* (directories) temp for readdir */4/spa>
 
 L44">1 4410a>        unsigned i_file_sec10a>;     class="comment">/* (files) minimalist cache of alloc info */4/spa>
 
 L45">1 4510a>        unsigned i_disk_sec10a>;     class="comment">/* (files) minimalist cache of alloc info */4/spa>
 
 L46">1 4610a>        unsigned i_n_secs10a>;       class="comment">/* (files) minimalist cache of alloc info */4/spa>
 
 L47">1 4710a>        unsigned i_ea_size10a>;      class="comment">/* size of extended attributes */4/spa>
 
 L48">1 4810a>        unsigned i_ea_mode10a> : 1;  class="comment">/* file's permiss  > is stored in ea */4/spa>
 
 L49">1 4910a>        unsigned i_ea_uid10a> : 1;   class="comment">/* file's uid is stored in ea */4/spa>
 
 L50">1 5010a>        unsigned i_ea_gid10a> : 1;   class="comment">/* file's gid is stored in ea */4/spa>
 
 L51">1 5110a>        unsigned i_dirty10a> : 1; 
 L52">1 5210a>        loff_t10a> **i_rddir_off10a>;i
 L53">1 5310a>        struct inode10a> vfs_inode10a>;i
 L54">1 5410a>};i
 L55">1 554/a>i
 L56">1 5610a>struct hpfs_sb_info10a> {i
 L57">1 5710a>        struct mutex10a> hpfs_mutex10a>;         class="comment">/* global hpfs lock */4/spa>
 
 L58">1 5810a>        ino_t10a> sb_root10a>;                   class="comment">/* inode number of root dir */4/spa>
 
 L59">1 5910a>        unsigned sb_fs_size10a>;             class="comment">/* file system size, sectors */4/spa>
 
 L60">1 6010a>        unsigned sb_bitmaps10a>;             class="comment">/* sector number of bitmap list */4/spa>
 
 L61">1 6110a>        unsigned sb_dirband_start10a>;       class="comment">/* directory band start sector */4/spa>
 
 L62">1 6210a>        unsigned sb_dirband_size10a>;        class="comment">/* directory band size, dnodes */4/spa>
 
 L63">1 6310a>        unsigned sb_dmap10a>;                class="comment">/* sector number of dnode bit map */4/spa>
 
 L64">1 6410a>        unsigned sb_n_free10a>;              class="comment">/* free blocks for statfs, or -1 */4/spa>
 
 L65">1 6510a>        unsigned sb_n_free_dnodes10a>;       class="comment">/* free dnodes for statfs, or -1 */4/spa>
 
 L66">1 6610a>        kuid_t10a> sb_uid10a>;                   class="comment">/* uid from mount "
	  >s */4/spa>
 
 L67">1 6710a>        kgid_t10a> sb_gid10a>;                   class="comment">/* gid from mount "
	  >s */4/spa>
 
 L68">1 6810a>        umode_t10a> sb_mode10a>;                 class="comment">/* mode from mount "
	  >s */4/spa>
 
 L69">1 6910a>        unsigned sb_eas10a> : 2;             class="comment">/* eas: 0-ignore, 1-ro, 2-rw */4/spa>
 
 L70">1 7010a>        unsigned sb_err10a> : 2;             class="comment">/* on errs: 0-cont, 1-ro, 2-pa>ic */4/spa>
 
 L71">1 7110a>        unsigned sb_chk10a> : 2;             class="comment">/* checks: 0-no, 1-normal, 2-strict */4/spa>
 
 L72">1 7210a>        unsigned sb_lowercase10a> : 1;       class="comment">/* downcase filenam>s hackery */4/spa>
 
 L73">1 7310a>        unsigned sb_was_error10a> : 1;       class="comment">/* there was an error, set dirty flag */4/spa>
 
 L74">1 7410a>        unsigned sb_chkdsk10a> : 2;          class="comment">/* chkdsk: 0-no, 1-on errs, 2-allways */4/spa>
 
 L75">1 7510a>        unsigned char *sb_cp_table10a>;      class="comment">/* code page tables: */4/spa>
 
 L76">1 7610a>                                         class="comment">/*      128 bytes uppercasing table & */4/spa>
 
 L77">1 7710a>                                         class="comment">/*      128 bytes lowercasing table */4/spa>
 
 L78">1 7810a>        __le3210a> *sb_bmp_dir10a>;              class="comment">/* main bitmap directory */4/spa>
 
 L79">1 7910a>        unsigned sb_c_bitmap10a>;            class="comment">/* current bitmap */4/spa>
 
 L80">1 8010a>        unsigned sb_max_fwd_alloc10a>;       class="comment">/* max forwad alloca	  > */4/spa>
 
 L81">1 8110a>        int sb_tim>shift10a>;i
 L82">1 8210a>};i
 L83">1 834/a>i
 L84">1 844/a>4spa> class="comment">/* Four 512-byte buffers and the 2k block obtained by concatenating them */4/spa>
 
 L85">1 854/a>i
 L86">1 8610a>struct quad_buffer_head10a> {i
 L87">1 8710a>        struct buffer_head10a> *bh4/a>[4];i
 L88">1 8810a>        void *data10a>;i
 L89">1 8910a>};i
 L90">1 904/a>i
 L91">1 914/a>4spa> class="comment">/* The b-tree down pointer from a dir entry */4/spa>
 
 L92">1 924/a>i
 L93">1 9310a>static inline10a> dnode_secno10a> de_down_pointer10a> (struct hpfs_dirent10a> *de10a>)i
 L94">1 944/a>{i
 L95">1 9510a>  CHKCOND10a>(de10a>->down10a>,(4spa> class="string">"HPFS: de_down_pointer: !de->down\n"
));i
 L96">1 9610a>  return le32_to_cpu10a>(*(__le3210a> *) ((void *) de10a> + le16_to_cpu10a>(de10a>->length10a>) - 4));i
 L97">1 9710a>}i
 L98">1 984/a>i
 L99">1 994/a>4spa> class="comment">/* The first dir entry in a dnode */4/spa>
 
 L100">11004/a>i
 L101">110110a>static inline10a> struct hpfs_dirent10a> *dnode_first_de10a> (struct dnode10a> *dnode10a>)i
 L102">11024/a>{i
 L103">110310a>  return (void *) dnode10a>->dirent10a>;i
 L104">110410a>}i
 L105">11054/a>i
 L106">11064/a>4spa> class="comment">/* The end+1 of the dir entries */4/spa>
 
 L107">11074/a>i
 L108">110810a>static inline10a> struct hpfs_dirent10a> *dnode_end_de10a> (struct dnode10a> *dnode10a>)i
 L109">11094/a>{i
 L110">111010a>  CHKCOND10a>(le32_to_cpu10a>(dnode10a>->first_free10a>)>=0x14 && le32_to_cpu10a>(dnode10a>->first_free10a>)<=0xa00,(4spa> class="string">"HPFS: dnode_end_de: dnode->first_free = %x\n"
,(unsigned)le32_to_cpu10a>(dnode10a>->first_free10a>)));i
 L111">111110a>  return (void *) dnode10a> + le32_to_cpu10a>(dnode10a>->first_free10a>);i
 L112">11124/a>}i
 L113">11134/a>i
 L114">11144/a>4spa> class="comment">/* The dir entry after dir entry de */4/spa>
 
 L115">11154/a>i
 L116">111610a>static inline10a> struct hpfs_dirent10a> *de_next_de10a> (struct hpfs_dirent10a> *de10a>)i
 L117">11174/a>{i
 L118">111810a>  CHKCOND10a>(le16_to_cpu10a>(de10a>->length10a>)>=0x20 && le16_to_cpu10a>(de10a>->length10a>)<0x800,(4spa> class="string">"HPFS: de_next_de: de->length = %x\n"
,(unsigned)le16_to_cpu10a>(de10a>->length10a>)));i
 L119">111910a>  return (void *) de10a> + le16_to_cpu10a>(de10a>->length10a>);i
 L120">112.10a>}i
 L121">11214/a>i
 L122">112210a>static inline10a> struct extended_attribute10a> *fnode_ea10a>(struct fnode10a> *fnode10a>)i
 L123">11234/a>{i
 L124">112410a>        return (struct extended_attribute10a> *)((char *)fnode10a> + le16_to_cpu10a>(fnode10a>->ea_offs10a>) + le16_to_cpu10a>(fnode10a>->acl_size_s10a>));i
 L125">112510a>}i
 L126">112610a>i
 L127">112710a>static inline10a> struct extended_attribute10a> *fnode_end_ea10a>(struct fnode10a> *fnode10a>)i
 L128">112810a>{i
 L129">112910a>        return (struct extended_attribute10a> *)((char *)fnode10a> + le16_to_cpu10a>(fnode10a>->ea_offs10a>) + le16_to_cpu10a>(fnode10a>->acl_size_s10a>) + le16_to_cpu10a>(fnode10a>->ea_size_s10a>));i
 L130">113.10a>}i
 L131">11314/a>i
 L132">113210a>static unsigned ea_tion>len10a>(struct extended_attribute10a> *ea10a>)i
 L133">11334/a>{i
 L134">113410a>        return ea10a>->tion>len_lo10a> + 256 * ea10a>->tion>len_hi10a>;i
 L135">113510a>}i
 L136">113610a>i
 L137">113710a>static inline10a> struct extended_attribute10a> *next_ea10a>(struct extended_attribute10a> *ea10a>)i
 L138">113810a>{i
 L139">113910a>        return (struct extended_attribute10a> *)((char *)ea10a> + 5 + ea10a>->nam>len10a> + ea_tion>len10a>(ea10a>));i
 L140">114.10a>}i
 L141">11414/a>i
 L142">114210a>static inline10a> secno10a> ea_sec10a>(struct extended_attribute10a> *ea10a>)i
 L143">11434/a>{i
 L144">114410a>        return le32_to_cpu10a>(get_unaligned10a>((__le3210a> *)((char *)ea10a> + 9 + ea10a>->nam>len10a>)));i
 L145">114510a>}i
 L146">114610a>i
 L147">114710a>static inline10a> secno10a> ea_len10a>(struct extended_attribute10a> *ea10a>)i
 L148">114810a>{i
 L149">114910a>        return le32_to_cpu10a>(get_unaligned10a>((__le3210a> *)((char *)ea10a> + 5 + ea10a>->nam>len10a>)));i
 L150">115.10a>}i
 L151">11514/a>i
 L152">115210a>static inline10a> char *ea_data10a>(struct extended_attribute10a> *ea10a>)i
 L153">11534/a>{i
 L154">115410a>        return (char *)((char *)ea10a> + 5 + ea10a>->nam>len10a>);i
 L155">115510a>}i
 L156">115610a>i
 L157">115710a>static inline10a> unsigned de_size10a>(int nam>len10a>, secno10a> down_ptr10a>)i
 L158">115810a>{i
 L159">115910a>        return ((0x1f + nam>len10a> + 3) & ~3) + (down_ptr10a> ? 4 : 0);i
 L160">116.10a>}i
 L161">11614/a>i
 L162">116210a>static inline10a> void copy_de10a>(struct hpfs_dirent10a> *dst10a>, struct hpfs_dirent10a> *src10a>)i
 L163">11634/a>{i
 L164">116410a>        int a10a>;i
 L165">116510a>        int n10a>;i
 L166">116610a>        if (!dst10a> || !src10a>) return;i
 L167">116710a>        a10a> = dst10a>->down10a>;i
 L168">116810a>        n10a> = dst10a>->not_8x310a>;i
 L169">116910a>        memcpy10a>((char *)dst10a> + 2, (char *)src10a> + 2, 28);i
 L170">117010a>        dst10a>->down10a> = a10a>;i
 L171">117110a>        dst10a>->not_8x310a> = n10a>;i
 L172">11724/a>}i
 L173">11734/a>i
 L174">117410a>static inline10a> unsigned tstbits10a>(__le3210a> *bmp10a>, unsigned b10a>, unsigned n10a>)i
 L175">117510a>{i
 L176">117610a>        int i10a>;i
 L177">117710a>        if ((b10a> >= 0x4000) || (b10a> + n10a> - 1 >= 0x4000)) return n10a>;i
 L178">117810a>        if (!((le32_to_cpu10a>(bmp10a>[(b10a> & 0x3fff) >> 5]) >> (b10a> & 0x1f)) & 1)) return 1; 
 L179">117910a>        for (i10a> = 1; i10a> < n10a>; i10a>++)i
 L180">118010a>                if (!((le32_to_cpu10a>(bmp10a>[((b10a>+i10a>) & 0x3fff) >> 5]) >> ((b10a>+i10a>) & 0x1f)) & 1))i
 L181">118110a>                        return i10a> + 1; 
 L182">118210a>        return 0; 
 L183">11834/a>}i
 L184">11844/a>i
 L185">11854/a>4spa> class="comment">/* alloc.c */4/spa>
 
 L186">118610a>i
 L187">118710a>int hpfs_chk_sectors10a>(struct super_block10a> *, secno10a>, int, char *);i
 L188">118810a>secno10a> hpfs_alloc_sector10a>(struct super_block10a> *, secno10a>, unsigned, int);i
 L189">118910a>int hpfs_alloc_if_possible10a>(struct super_block10a> *, secno10a>);i
 L190">11904/a>void hpfs_free_sectors10a>(struct super_block10a> *, secno10a>, unsigned);i
 L191">11914/a>int hpfs_check_free_dnodes10a>(struct super_block10a> *, int);i
 L192">11924/a>void hpfs_free_dnode10a>(struct super_block10a> *, secno10a>);i
 L193">119310a>struct dnode10a> *hpfs_alloc_dnode10a>(struct super_block10a> *, secno10a>, dnode_secno10a> *, struct quad_buffer_head10a> *);i
 L194">119410a>struct fnode10a> *hpfs_alloc_fnode10a>(struct super_block10a> *, secno10a>, fnode_secno10a> *, struct buffer_head10a> **);i
 L195">119510a>struct anode10a> *hpfs_alloc_anode10a>(struct super_block10a> *, secno10a>, anode_secno10a> *, struct buffer_head10a> **);i
 L196">119610a>i
 L197">119710a>4spa> class="comment">/* anode.c */4/spa>
 
 L198">11984/a>i
 L199">11994/a>4a href="+code=secno" class="sref">secno10a> hpfs_bplus_lookup10a>(struct super_block10a> *, struct inode10a> *, struct bplus_header10a> *, unsigned, struct buffer_head10a> *);i
 L200">12004/a>secno10a> hpfs_add_sector_to_btree10a>(struct super_block10a> *, secno10a>, int, unsigned);i
 L201">120110a>void hpfs_remove_btree10a>(struct super_block10a> *, struct bplus_header10a> *);i
 L202">12024/a>int hpfs_ea_read10a>(struct super_block10a> *, secno10a>, int, unsigned, unsigned, char *);i
 L203">120310a>int hpfs_ea_write10a>(struct super_block10a> *, secno10a>, int, unsigned, unsigned, const char *);i
 L204">120410a>void hpfs_ea_remove10a>(struct super_block10a> *, secno10a>, int, unsigned);i
 L205">12054/a>void hpfs_truncate_btree10a>(struct super_block10a> *, secno10a>, int, unsigned);i
 L206">12064/a>void hpfs_remove_fnode10a>(struct super_block10a> *, fnode_secno10a> fno10a>);i
 L207">12074/a>i
 L208">120810a>4spa> class="comment">/* buffer.c */4/spa>
 
 L209">12094/a> 
 L210">12104/a>void *hpfs_map_sector10a>(struct super_block10a> *, unsigned, struct buffer_head10a> **, int);i
 L211">12114/a>void *hpfs_get_sector10a>(struct super_block10a> *, unsigned, struct buffer_head10a> **);i
 L212">12124/a>void *hpfs_map_4sectors10a>(struct super_block10a> *, unsigned, struct quad_buffer_head10a> *, int);i
 L213">12134/a>void *hpfs_get_4sectors10a>(struct super_block10a> *, unsigned, struct quad_buffer_head10a> *);i
 L214">121410a>void hpfs_brelse410a>(struct quad_buffer_head10a> *);i
 L215">12154/a>void hpfs_mark_4buffers_dirty10a>(struct quad_buffer_head10a> *);i
 L216">121610a>i
 L217">121710a>4spa> class="comment">/* dentry.c */4/spa>
 
 L218">12184/a>i
 L219">121910a>extern const struct dentry_opera	  >s10a> hpfs_dentry_opera	  >s10a>;i
 L220">12204/a>i
 L221">12214/a>4spa> class="comment">/* dir.c */4/spa>
 
 L222">12224/a>i
 L223">122310a>struct dentry10a> *hpfs_lookup10a>(struct inode10a> *, struct dentry10a> *, unsigned int);i
 L224">122410a>extern const struct file_opera	  >s10a> hpfs_dir_ops10a>;i
 L225">12254/a>i
 L226">12264/a>4spa> class="comment">/* dnode.c */4/spa>
 
 L227">12274/a>i
 L228">122810a>void hpfs_add_pos10a>(struct inode10a> *, loff_t10a> *);i
 L229">122910a>void hpfs_del_pos10a>(struct inode10a> *, loff_t10a> *);i
 L230">123.10a>struct hpfs_dirent10a> *hpfs_add_de10a>(struct super_block10a> *, struct dnode10a> *,i
 L231">123110a>                                const unsigned char *, unsigned, secno10a>);i
 L232">12324/a>int hpfs_add_dirent10a>(struct inode10a> *, const unsigned char *, unsigned,i
 L233">123310a>                    struct hpfs_dirent10a> *);i
 L234">123410a>int hpfs_remove_dirent10a>(struct inode10a> *, dnode_secno10a>, struct hpfs_dirent10a> *, struct quad_buffer_head10a> *, int);i
 L235">12354/a>void hpfs_count_dnodes10a>(struct super_block10a> *, dnode_secno10a>, int *, int *, int *);i
 L236">123610a>dnode_secno10a> hpfs_de_as_down_as_possible10a>(struct super_block10a> *, dnode_secno10a> dno10a>);i
 L237">123710a>struct hpfs_dirent10a> *map_pos_dirent10a>(struct inode10a> *, loff_t10a> *, struct quad_buffer_head10a> *);i
 L238">123810a>struct hpfs_dirent10a> *map_dirent10a>(struct inode10a> *, dnode_secno10a>,i
 L239">123910a>                               const unsigned char *, unsigned, dnode_secno10a> *,i
 L240">124010a>                               struct quad_buffer_head10a> *);i
 L241">124110a>void hpfs_remove_dtree10a>(struct super_block10a> *, dnode_secno10a>);i
 L242">124210a>struct hpfs_dirent10a> *map_fnode_dirent10a>(struct super_block10a> *, fnode_secno10a>, struct fnode10a> *, struct quad_buffer_head10a> *);i
 L243">12434/a>i
 L244">12444/a>4spa> class="comment">/* ea.c */4/spa>
 
 L245">12454/a>i
 L246">12464/a>void hpfs_ea_ext_remove10a>(struct super_block10a> *, secno10a>, int, unsigned);i
 L247">124710a>int hpfs_read_ea10a>(struct super_block10a> *, struct fnode10a> *, char *, char *, int);i
 L248">124810a>char *hpfs_get_ea10a>(struct super_block10a> *, struct fnode10a> *, char *, int *);i
 L249">124910a>void hpfs_set_ea10a>(struct inode10a> *, struct fnode10a> *, const char *,i
 L250">125010a>                 const char *, int);i
 L251">12514/a>i
 L252">125210a>4spa> class="comment">/* file.c */4/spa>
 
 L253">12534/a>i
 L254">125410a>int hpfs_file_fsync10a>(struct file10a> *, loff_t10a>, loff_t10a>, int);i
 L255">12554/a>void hpfs_truncate10a>(struct inode10a> *);i
 L256">125610a>extern const struct file_opera	  >s10a> hpfs_file_ops10a>;i
 L257">125710a>extern const struct inode_opera	  >s10a> hpfs_file_iops10a>;i
 L258">125810a>extern const struct address_space_opera	  >s10a> hpfs_aops10a>;i
 L259">12594/a> 
 L260">126.10a>4spa> class="comment">/* inode.c */4/spa>
 
 L261">12614/a>i
 L262">12624/a>void hpfs_init_inode10a>(struct inode10a> *);i
 L263">12634/a>void hpfs_read_inode10a>(struct inode10a> *);i
 L264">126410a>void hpfs_write_inode10a>(struct inode10a> *);i
 L265">12654/a>void hpfs_write_inode_nolock10a>(struct inode10a> *);i
 L266">126610a>int hpfs_setattr10a>(struct dentry10a> *, struct iattr10a> *);i
 L267">126710a>void hpfs_write_if_changed10a>(struct inode10a> *);i
 L268">126810a>void hpfs_evict_inode10a>(struct inode10a> *);i
 L269">12694/a> 
 L270">127.10a>4spa> class="comment">/* map.c */4/spa>
 
 L271">12714/a>i
 L272">12724/a>__le3210a> *hpfs_map_dnode_bitmap10a>(struct super_block10a> *, struct quad_buffer_head10a> *);i
 L273">12734/a>__le3210a> *hpfs_map_bitmap10a>(struct super_block10a> *, unsigned, struct quad_buffer_head10a> *, char *);i
 L274">127410a>unsigned char *hpfs_load_code_page10a>(struct super_block10a> *, secno10a>);i
 L275">127510a>__le3210a> *hpfs_load_bitmap_directory10a>(struct super_block10a> *, secno10a> bmp10a>);i
 L276">127610a>struct fnode10a> *hpfs_map_fnode10a>(struct super_block10a> *s10a>, ino_t10a>, struct buffer_head10a> **);i
 L277">127710a>struct anode10a> *hpfs_map_anode10a>(struct super_block10a> *s10a>, anode_secno10a>, struct buffer_head10a> **);i
 L278">127810a>struct dnode10a> *hpfs_map_dnode10a>(struct super_block10a> *s10a>, dnode_secno10a>, struct quad_buffer_head10a> *);i
 L279">12794/a>4a href="+code=dnode_secno" class="sref">dnode_secno10a> hpfs_fnode_dno10a>(struct super_block10a> *s10a>, ino_t10a> ino10a>);i
 L280">12804/a>i
 L281">12814/a>4spa> class="comment">/* nam>.c */4/spa>
 
 L282">12824/a>i
 L283">12834/a>unsigned char hpfs_upcase10a>(unsigned char *, unsigned char);i
 L284">128410a>int hpfs_chk_nam>10a>(const unsigned char *, unsigned *);i
 L285">12854/a>unsigned char *hpfs_translate_nam>10a>(struct super_block10a> *, unsigned char *, unsigned, int, int);i
 L286">128610a>int hpfs_compare_nam>s10a>(struct super_block10a> *, const unsigned char *, unsigned,i
 L287">128710a>                       const unsigned char *, unsigned, int);i
 L288">128810a>int hpfs_is_nam>_long10a>(const unsigned char *, unsigned);i
 L289">128910a>void hpfs_adjust_length10a>(const unsigned char *, unsigned *);i
 L290">12904/a>i
 L291">12914/a>4spa> class="comment">/* nam>i.c */4/spa>
 
 L292">12924/a>i
 L293">129310a>extern const struct inode_opera	  >s10a> hpfs_dir_iops10a>;i
 L294">129410a>extern const struct address_space_opera	  >s10a> hpfs_symlink_aops10a>;i
 L295">12954/a>i
 L296">129610a>static inline10a> struct hpfs_inode_info10a> *hpfs_i10a>(struct inode10a> *inode10a>)i
 L297">129710a>{i
 L298">129810a>        return list_entry10a>(inode10a>, struct hpfs_inode_info10a>, vfs_inode10a>);i
 L299">12994/a>}i
 L300">13004/a>i
 L301">130110a>static inline10a> struct hpfs_sb_info10a> *hpfs_sb10a>(struct super_block10a> *sb10a>)i
 L302">13024/a>{i
 L303">130310a>        return sb10a>->s_fs_info10a>;i
 L304">130410a>}i
 L305">13054/a>i
 L306">13064/a>4spa> class="comment">/* super.c */4/spa>
 
 L307">13074/a>i
 L308">130810a>__printf10a>(2, 3)i
 L309">130910a>void hpfs_error10a>(struct super_block10a> *, const char *, ...);i
 L310">13104/a>int hpfs_stop_cycl>s10a>(struct super_block10a> *, int, int *, int *, char *);i
 L311">13114/a>unsigned hpfs_count_one_bitmap10a>(struct super_block10a> *, secno10a>);i
 L312">13124/a>i
 L313">13134/a>4spa> class="comment">/*4/spa>
 
 L314">13144/a>4spa> class="comment"> * local time (HPFS) to GMT (Unix)4/spa>
 
 L315">13154/a>4spa> class="comment"> */4/spa>
 
 L316">131610a>i
 L317">131710a>static inline10a> time_t10a> local_to_gmt10a>(struct super_block10a> *s10a>, time32_t10a> t10a>)i
 L318">13184/a>{i
 L319">131910a>        extern struct timezone10a> sys_tz10a>;i
 L320">132010a>        return t10a> + sys_tz10a>.tz_minuteswest10a> * 60 + hpfs_sb10a>(s10a>)->sb_timeshift10a>;i
 L321">13214/a>}i
 L322">13224/a>i
 L323">132310a>static inline10a> time32_t10a> gmt_to_local10a>(struct super_block10a> *s10a>, time_t10a> t10a>)i
 L324">132410a>{i
 L325">13254/a>        extern struct timezone10a> sys_tz10a>;i
 L326">132610a>        return t10a> - sys_tz10a>.tz_minuteswest10a> * 60 - hpfs_sb10a>(s10a>)->sb_timeshift10a>;i
 L327">13274/a>}i
 L328">13284/a>i
 L329">132910a>4spa> class="comment">/*4/spa>
 
 L330">133.10a>4spa> class="comment"> * Locking:4/spa>
 
 L331">13314/a>4spa> class="comment"> *4/spa>
 
 L332">133210a>4spa> class="comment"> * hpfs_lock() locks the whole filesystem. It must be taken4/spa>
 
 L333">13334/a>4spa> class="comment"> * on any method called by the VFS.4/spa>
 
 L334">13344/a>4spa> class="comment"> *4/spa>
 
 L335">13354/a>4spa> class="comment"> * We don't do any per-file locking anymore, it is hard to4/spa>
 
 L336">13364/a>4spa> class="comment"> * review and HPFS is not performance-sensitive anyway.4/spa>
 
 L337">133710a>4spa> class="comment"> */4/spa>
 
 L338">133810a>static inline10a> void hpfs_lock10a>(struct super_block10a> *s10a>)i
 L339">133910a>{i
 L340">134010a>        struct hpfs_sb_info10a> *sbi10a> = hpfs_sb10a>(s10a>);i
 L341">134110a>        mutex_lock10a>(&sbi10a>->hpfs_mutex10a>);i
 L342">134210a>}i
 L343">13434/a>i
 L344">134410a>static inline10a> void hpfs_unlock10a>(struct super_block10a> *s10a>)i
 L345">13454/a>{i
 L346">134610a>        struct hpfs_sb_info10a> *sbi10a> = hpfs_sb10a>(s10a>);i
 L347">134710a>        mutex_unlock10a>(&sbi10a>->hpfs_mutex10a>);i
 L348">134810a>}i
 L349">13494/a> 
 L350">135010a>static inline10a> void hpfs_lock_assert10a>(struct super_block10a> *s10a>)i
 L351">13514/a>{i
 L352">135210a>        struct hpfs_sb_info10a> *sbi10a> = hpfs_sb10a>(s10a>);i
 L353">135310a>        WARN_ON10a>(!mutex_is_locked10a>(&sbi10a>->hpfs_mutex10a>));i
 L354">135410a>}i
 L355">13554/a>
lxr.linux.no kindly hosted by Redpill Linpro AS10a>, provider of Linux consulting and opera >s services since11995.