15 #include <linux/slab.h>
16 #include <asm/unaligned.h>
21 #define EFSERROR EPERM
22 #define EMEMERROR ENOMEM
24 #define ANODE_ALLOC_FWD 512
25 #define FNODE_ALLOC_FWD 0
26 #define ALLOC_FWD_MIN 16
27 #define ALLOC_FWD_MAX 128
29 #define FNODE_RD_AHEAD 16
30 #define ANODE_RD_AHEAD 16
31 #define DNODE_RD_AHEAD 4
33 #define FREE_DNODES_ADD 58
34 #define FREE_DNODES_DEL 29
36 #define CHKCOND(x,y) if (!(x)) printk y
87 struct buffer_head *
bh[4];
95 CHKCOND(de->
down,(
"HPFS: de_down_pointer: !de->down\n"));
103 return (
void *) dnode->
dirent;
108 static inline struct hpfs_dirent *dnode_end_de (
struct dnode *dnode)
154 return (
char *)((
char *)ea + 5 + ea->
namelen);
157 static inline unsigned de_size(
int namelen,
secno down_ptr)
159 return ((0x1f + namelen + 3) & ~3) + (down_ptr ? 4 : 0);
166 if (!dst || !src)
return;
169 memcpy((
char *)dst + 2, (
char *)src + 2, 28);
174 static inline unsigned tstbits(
__le32 *bmp,
unsigned b,
unsigned n)
177 if ((b >= 0x4000) || (b + n - 1 >= 0x4000))
return n;
178 if (!((
le32_to_cpu(bmp[(b & 0x3fff) >> 5]) >> (b & 0x1f)) & 1))
return 1;
179 for (i = 1; i <
n; i++)
180 if (!((
le32_to_cpu(bmp[((b+i) & 0x3fff) >> 5]) >> ((b+i) & 0x1f)) & 1))
231 const unsigned char *,
unsigned,
secno);
282 unsigned char hpfs_upcase(
unsigned char *,
unsigned char);
286 const unsigned char *,
unsigned,
int);
319 return t +
sys_tz.tz_minuteswest * 60 + hpfs_sb(s)->sb_timeshift;
325 return t -
sys_tz.tz_minuteswest * 60 - hpfs_sb(s)->sb_timeshift;
349 static inline void hpfs_lock_assert(
struct super_block *
s)