Blame view

fs/hfsplus/hfsplus_fs.h 13.1 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
7
8
9
10
11
12
13
  /*
   *  linux/include/linux/hfsplus_fs.h
   *
   * Copyright (C) 1999
   * Brad Boyer (flar@pants.nu)
   * (C) 2003 Ardis Technologies <roman@ardistech.com>
   *
   */
  
  #ifndef _LINUX_HFSPLUS_FS_H
  #define _LINUX_HFSPLUS_FS_H
  
  #include <linux/fs.h>
895c23f8c   Matthias Kaehlcke   hfsplus: convert ...
14
  #include <linux/mutex.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
15
  #include <linux/buffer_head.h>
6596528e3   Seth Forshee   hfsplus: ensure b...
16
  #include <linux/blkdev.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
17
18
19
20
21
22
23
24
25
  #include "hfsplus_raw.h"
  
  #define DBG_BNODE_REFS	0x00000001
  #define DBG_BNODE_MOD	0x00000002
  #define DBG_CAT_MOD	0x00000004
  #define DBG_INODE	0x00000008
  #define DBG_SUPER	0x00000010
  #define DBG_EXTENT	0x00000020
  #define DBG_BITMAP	0x00000040
21f2296a5   Anton Salikhmetov   hfsplus: C99 comm...
26
27
28
29
30
  #if 0
  #define DBG_MASK	(DBG_EXTENT|DBG_INODE|DBG_BNODE_MOD)
  #define DBG_MASK	(DBG_BNODE_MOD|DBG_CAT_MOD|DBG_INODE)
  #define DBG_MASK	(DBG_CAT_MOD|DBG_BNODE_REFS|DBG_INODE|DBG_EXTENT)
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
31
32
33
  #define DBG_MASK	(0)
  
  #define dprint(flg, fmt, args...) \
b2837fcf4   Anton Salikhmetov   hfsplus: %L-to-%l...
34
35
  	if (flg & DBG_MASK) \
  		printk(fmt , ## args)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
36
37
38
39
40
41
  
  /* Runtime config options */
  #define HFSPLUS_DEF_CR_TYPE    0x3F3F3F3F  /* '????' */
  
  #define HFSPLUS_TYPE_DATA 0x00
  #define HFSPLUS_TYPE_RSRC 0xFF
2753cc281   Anton Salikhmetov   hfsplus: over 80 ...
42
43
  typedef int (*btree_keycmp)(const hfsplus_btree_key *,
  		const hfsplus_btree_key *);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
  
  #define NODE_HASH_SIZE	256
  
  /* An HFS+ BTree held in memory */
  struct hfs_btree {
  	struct super_block *sb;
  	struct inode *inode;
  	btree_keycmp keycmp;
  
  	u32 cnid;
  	u32 root;
  	u32 leaf_count;
  	u32 leaf_head;
  	u32 leaf_tail;
  	u32 node_count;
  	u32 free_nodes;
  	u32 attributes;
  
  	unsigned int node_size;
  	unsigned int node_size_shift;
  	unsigned int max_key_len;
  	unsigned int depth;
467c3d9cd   Thomas Gleixner   hfsplus: convert ...
66
  	struct mutex tree_lock;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
  
  	unsigned int pages_per_bnode;
  	spinlock_t hash_lock;
  	struct hfs_bnode *node_hash[NODE_HASH_SIZE];
  	int node_hash_cnt;
  };
  
  struct page;
  
  /* An HFS+ BTree node in memory */
  struct hfs_bnode {
  	struct hfs_btree *tree;
  
  	u32 prev;
  	u32 this;
  	u32 next;
  	u32 parent;
  
  	u16 num_recs;
  	u8 type;
  	u8 height;
  
  	struct hfs_bnode *next_hash;
  	unsigned long flags;
  	wait_queue_head_t lock_wq;
  	atomic_t refcnt;
  	unsigned int page_offset;
  	struct page *page[0];
  };
  
  #define HFS_BNODE_LOCK		0
  #define HFS_BNODE_ERROR		1
  #define HFS_BNODE_NEW		2
  #define HFS_BNODE_DIRTY		3
  #define HFS_BNODE_DELETED	4
  
  /*
   * HFS+ superblock info (built from Volume Header on disk)
   */
  
  struct hfsplus_vh;
  struct hfs_btree;
  
  struct hfsplus_sb_info {
6596528e3   Seth Forshee   hfsplus: ensure b...
111
  	void *s_vhdr_buf;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
112
  	struct hfsplus_vh *s_vhdr;
6596528e3   Seth Forshee   hfsplus: ensure b...
113
  	void *s_backup_vhdr_buf;
52399b171   Christoph Hellwig   hfsplus: use raw ...
114
  	struct hfsplus_vh *s_backup_vhdr;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
115
116
117
118
119
120
121
122
123
  	struct hfs_btree *ext_tree;
  	struct hfs_btree *cat_tree;
  	struct hfs_btree *attr_tree;
  	struct inode *alloc_file;
  	struct inode *hidden_dir;
  	struct nls_table *nls;
  
  	/* Runtime variables */
  	u32 blockoffset;
52399b171   Christoph Hellwig   hfsplus: use raw ...
124
125
  	sector_t part_start;
  	sector_t sect_count;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
126
  	int fs_shift;
7ac9fb9c2   Christoph Hellwig   hfsplus: add per-...
127
  	/* immutable data from the volume header */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
128
129
130
  	u32 alloc_blksz;
  	int alloc_blksz_shift;
  	u32 total_blocks;
7ac9fb9c2   Christoph Hellwig   hfsplus: add per-...
131
132
133
  	u32 data_clump_blocks, rsrc_clump_blocks;
  
  	/* mutable data from the volume header, protected by alloc_mutex */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
134
  	u32 free_blocks;
7ac9fb9c2   Christoph Hellwig   hfsplus: add per-...
135
136
137
  	struct mutex alloc_mutex;
  
  	/* mutable data from the volume header, protected by vh_mutex */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
138
139
140
  	u32 next_cnid;
  	u32 file_count;
  	u32 folder_count;
7ac9fb9c2   Christoph Hellwig   hfsplus: add per-...
141
  	struct mutex vh_mutex;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
142
143
144
145
146
147
148
149
150
151
152
153
  
  	/* Config options */
  	u32 creator;
  	u32 type;
  
  	umode_t umask;
  	uid_t uid;
  	gid_t gid;
  
  	int part, session;
  
  	unsigned long flags;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
154
  };
84adede31   Christoph Hellwig   hfsplus: use atom...
155
156
157
158
159
  #define HFSPLUS_SB_WRITEBACKUP	0
  #define HFSPLUS_SB_NODECOMPOSE	1
  #define HFSPLUS_SB_FORCE	2
  #define HFSPLUS_SB_HFSX		3
  #define HFSPLUS_SB_CASEFOLD	4
34a2d313c   Christoph Hellwig   hfsplus: flush di...
160
  #define HFSPLUS_SB_NOBARRIER	5
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
161

e34947056   Christoph Hellwig   hfsplus: optimize...
162
163
164
165
  static inline struct hfsplus_sb_info *HFSPLUS_SB(struct super_block *sb)
  {
  	return sb->s_fs_info;
  }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
166
167
168
  
  
  struct hfsplus_inode_info {
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
169
  	atomic_t opencnt;
7fcc99f4f   Christoph Hellwig   hfsplus: add miss...
170
171
172
173
174
175
176
177
178
179
  	/*
  	 * Extent allocation information, protected by extents_lock.
  	 */
  	u32 first_blocks;
  	u32 clump_blocks;
  	u32 alloc_blocks;
  	u32 cached_start;
  	u32 cached_blocks;
  	hfsplus_extent_rec first_extents;
  	hfsplus_extent_rec cached_extents;
b33b7921d   Christoph Hellwig   hfsplus: split up...
180
  	unsigned int extent_state;
7fcc99f4f   Christoph Hellwig   hfsplus: add miss...
181
  	struct mutex extents_lock;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
182

7fcc99f4f   Christoph Hellwig   hfsplus: add miss...
183
184
185
186
  	/*
  	 * Immutable data.
  	 */
  	struct inode *rsrc_inode;
9a4cad95c   Roman Zippel   [PATCH] hfs: set ...
187
  	__be32 create_date;
f6089ff87   Christoph Hellwig   hfsplus: fix link...
188
189
190
191
192
  
  	/*
  	 * Protected by sbi->vh_mutex.
  	 */
  	u32 linkid;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
193

7fcc99f4f   Christoph Hellwig   hfsplus: add miss...
194
  	/*
b33b7921d   Christoph Hellwig   hfsplus: split up...
195
196
197
198
199
  	 * Accessed using atomic bitops.
  	 */
  	unsigned long flags;
  
  	/*
7fcc99f4f   Christoph Hellwig   hfsplus: add miss...
200
201
202
  	 * Protected by i_mutex.
  	 */
  	sector_t fs_blocks;
722c55d13   Christoph Hellwig   hfsplus: remove s...
203
  	u8 userflags;		/* BSD user file flags */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
204
205
  	struct list_head open_dir_list;
  	loff_t phys_size;
7fcc99f4f   Christoph Hellwig   hfsplus: add miss...
206

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
207
208
  	struct inode vfs_inode;
  };
b33b7921d   Christoph Hellwig   hfsplus: split up...
209
210
211
212
  #define HFSPLUS_EXT_DIRTY	0x0001
  #define HFSPLUS_EXT_NEW		0x0002
  
  #define HFSPLUS_I_RSRC		0	/* represents a resource fork */
e34947056   Christoph Hellwig   hfsplus: optimize...
213
214
215
  #define HFSPLUS_I_CAT_DIRTY	1	/* has changes in the catalog tree */
  #define HFSPLUS_I_EXT_DIRTY	2	/* has changes in the extent tree */
  #define HFSPLUS_I_ALLOC_DIRTY	3	/* has changes in the allocation file */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
216

b33b7921d   Christoph Hellwig   hfsplus: split up...
217
218
  #define HFSPLUS_IS_RSRC(inode) \
  	test_bit(HFSPLUS_I_RSRC, &HFSPLUS_I(inode)->flags)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
219

e34947056   Christoph Hellwig   hfsplus: optimize...
220
221
222
223
  static inline struct hfsplus_inode_info *HFSPLUS_I(struct inode *inode)
  {
  	return list_entry(inode, struct hfsplus_inode_info, vfs_inode);
  }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
224

e34947056   Christoph Hellwig   hfsplus: optimize...
225
226
227
228
229
230
231
232
233
234
235
236
  /*
   * Mark an inode dirty, and also mark the btree in which the
   * specific type of metadata is stored.
   * For data or metadata that gets written back by into the catalog btree
   * by hfsplus_write_inode a plain mark_inode_dirty call is enough.
   */
  static inline void hfsplus_mark_inode_dirty(struct inode *inode,
  		unsigned int flag)
  {
  	set_bit(flag, &HFSPLUS_I(inode)->flags);
  	mark_inode_dirty(inode);
  }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
  
  struct hfs_find_data {
  	/* filled by caller */
  	hfsplus_btree_key *search_key;
  	hfsplus_btree_key *key;
  	/* filled by find */
  	struct hfs_btree *tree;
  	struct hfs_bnode *bnode;
  	/* filled by findrec */
  	int record;
  	int keyoffset, keylength;
  	int entryoffset, entrylength;
  };
  
  struct hfsplus_readdir_data {
  	struct list_head list;
  	struct file *file;
  	struct hfsplus_cat_key key;
  };
6596528e3   Seth Forshee   hfsplus: ensure b...
256
257
258
259
260
261
262
263
  /*
   * Find minimum acceptible I/O size for an hfsplus sb.
   */
  static inline unsigned short hfsplus_min_io_size(struct super_block *sb)
  {
  	return max_t(unsigned short, bdev_logical_block_size(sb->s_bdev),
  		     HFSPLUS_SECTOR_SIZE);
  }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
  #define hfs_btree_open hfsplus_btree_open
  #define hfs_btree_close hfsplus_btree_close
  #define hfs_btree_write hfsplus_btree_write
  #define hfs_bmap_alloc hfsplus_bmap_alloc
  #define hfs_bmap_free hfsplus_bmap_free
  #define hfs_bnode_read hfsplus_bnode_read
  #define hfs_bnode_read_u16 hfsplus_bnode_read_u16
  #define hfs_bnode_read_u8 hfsplus_bnode_read_u8
  #define hfs_bnode_read_key hfsplus_bnode_read_key
  #define hfs_bnode_write hfsplus_bnode_write
  #define hfs_bnode_write_u16 hfsplus_bnode_write_u16
  #define hfs_bnode_clear hfsplus_bnode_clear
  #define hfs_bnode_copy hfsplus_bnode_copy
  #define hfs_bnode_move hfsplus_bnode_move
  #define hfs_bnode_dump hfsplus_bnode_dump
  #define hfs_bnode_unlink hfsplus_bnode_unlink
  #define hfs_bnode_findhash hfsplus_bnode_findhash
  #define hfs_bnode_find hfsplus_bnode_find
  #define hfs_bnode_unhash hfsplus_bnode_unhash
  #define hfs_bnode_free hfsplus_bnode_free
  #define hfs_bnode_create hfsplus_bnode_create
  #define hfs_bnode_get hfsplus_bnode_get
  #define hfs_bnode_put hfsplus_bnode_put
  #define hfs_brec_lenoff hfsplus_brec_lenoff
  #define hfs_brec_keylen hfsplus_brec_keylen
  #define hfs_brec_insert hfsplus_brec_insert
  #define hfs_brec_remove hfsplus_brec_remove
  #define hfs_find_init hfsplus_find_init
  #define hfs_find_exit hfsplus_find_exit
  #define __hfs_brec_find __hplusfs_brec_find
  #define hfs_brec_find hfsplus_brec_find
  #define hfs_brec_read hfsplus_brec_read
  #define hfs_brec_goto hfsplus_brec_goto
  #define hfs_part_find hfsplus_part_find
  
  /*
   * definitions for ext2 flag ioctls (linux really needs a generic
   * interface for this).
   */
  
  /* ext2 ioctls (EXT2_IOC_GETFLAGS and EXT2_IOC_SETFLAGS) to support
   * chattr/lsattr */
36695673b   David Howells   [PATCH] BLOCK: Mo...
306
307
  #define HFSPLUS_IOC_EXT2_GETFLAGS	FS_IOC_GETFLAGS
  #define HFSPLUS_IOC_EXT2_SETFLAGS	FS_IOC_SETFLAGS
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
  
  
  /*
   * Functions in any *.c used in other files
   */
  
  /* bitmap.c */
  int hfsplus_block_allocate(struct super_block *, u32, u32, u32 *);
  int hfsplus_block_free(struct super_block *, u32, u32);
  
  /* btree.c */
  struct hfs_btree *hfs_btree_open(struct super_block *, u32);
  void hfs_btree_close(struct hfs_btree *);
  void hfs_btree_write(struct hfs_btree *);
  struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *);
  void hfs_bmap_free(struct hfs_bnode *);
  
  /* bnode.c */
  void hfs_bnode_read(struct hfs_bnode *, void *, int, int);
  u16 hfs_bnode_read_u16(struct hfs_bnode *, int);
  u8 hfs_bnode_read_u8(struct hfs_bnode *, int);
  void hfs_bnode_read_key(struct hfs_bnode *, void *, int);
  void hfs_bnode_write(struct hfs_bnode *, void *, int, int);
  void hfs_bnode_write_u16(struct hfs_bnode *, int, u16);
  void hfs_bnode_clear(struct hfs_bnode *, int, int);
  void hfs_bnode_copy(struct hfs_bnode *, int,
  		    struct hfs_bnode *, int, int);
  void hfs_bnode_move(struct hfs_bnode *, int, int, int);
  void hfs_bnode_dump(struct hfs_bnode *);
  void hfs_bnode_unlink(struct hfs_bnode *);
  struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *, u32);
  struct hfs_bnode *hfs_bnode_find(struct hfs_btree *, u32);
  void hfs_bnode_unhash(struct hfs_bnode *);
  void hfs_bnode_free(struct hfs_bnode *);
  struct hfs_bnode *hfs_bnode_create(struct hfs_btree *, u32);
  void hfs_bnode_get(struct hfs_bnode *);
  void hfs_bnode_put(struct hfs_bnode *);
  
  /* brec.c */
  u16 hfs_brec_lenoff(struct hfs_bnode *, u16, u16 *);
  u16 hfs_brec_keylen(struct hfs_bnode *, u16);
  int hfs_brec_insert(struct hfs_find_data *, void *, int);
  int hfs_brec_remove(struct hfs_find_data *);
  
  /* bfind.c */
  int hfs_find_init(struct hfs_btree *, struct hfs_find_data *);
  void hfs_find_exit(struct hfs_find_data *);
  int __hfs_brec_find(struct hfs_bnode *, struct hfs_find_data *);
  int hfs_brec_find(struct hfs_find_data *);
  int hfs_brec_read(struct hfs_find_data *, void *, int);
  int hfs_brec_goto(struct hfs_find_data *, int);
  
  /* catalog.c */
2753cc281   Anton Salikhmetov   hfsplus: over 80 ...
361
362
363
364
365
366
  int hfsplus_cat_case_cmp_key(const hfsplus_btree_key *,
  		const hfsplus_btree_key *);
  int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *,
  		const hfsplus_btree_key *);
  void hfsplus_cat_build_key(struct super_block *sb,
  		hfsplus_btree_key *, u32, struct qstr *);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
367
368
369
370
371
  int hfsplus_find_cat(struct super_block *, u32, struct hfs_find_data *);
  int hfsplus_create_cat(u32, struct inode *, struct qstr *, struct inode *);
  int hfsplus_delete_cat(u32, struct inode *, struct qstr *);
  int hfsplus_rename_cat(u32, struct inode *, struct qstr *,
  		       struct inode *, struct qstr *);
90e616905   Christoph Hellwig   hfsplus: create c...
372
  void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
373

4b0a8da7a   Adrian Bunk   fs/hfsplus/: prop...
374
375
376
  /* dir.c */
  extern const struct inode_operations hfsplus_dir_inode_operations;
  extern const struct file_operations hfsplus_dir_operations;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
377
  /* extents.c */
2179d372d   David Elliott   [PATCH] hfs: add ...
378
  int hfsplus_ext_cmp_key(const hfsplus_btree_key *, const hfsplus_btree_key *);
dd7f3d545   Alexey Khoroshilov   hfsplus: Add erro...
379
  int hfsplus_ext_write_extent(struct inode *);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
380
  int hfsplus_get_block(struct inode *, sector_t, struct buffer_head *, int);
2753cc281   Anton Salikhmetov   hfsplus: over 80 ...
381
382
  int hfsplus_free_fork(struct super_block *, u32,
  		struct hfsplus_fork_raw *, int);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
383
384
385
386
  int hfsplus_file_extend(struct inode *);
  void hfsplus_file_truncate(struct inode *);
  
  /* inode.c */
f5e54d6e5   Christoph Hellwig   [PATCH] mark addr...
387
388
  extern const struct address_space_operations hfsplus_aops;
  extern const struct address_space_operations hfsplus_btree_aops;
e16404ed0   Al Viro   constify dentry_o...
389
  extern const struct dentry_operations hfsplus_dentry_operations;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
390
391
392
393
394
  
  void hfsplus_inode_read_fork(struct inode *, struct hfsplus_fork_raw *);
  void hfsplus_inode_write_fork(struct inode *, struct hfsplus_fork_raw *);
  int hfsplus_cat_read_inode(struct inode *, struct hfs_find_data *);
  int hfsplus_cat_write_inode(struct inode *);
c47da7985   Al Viro   hfsplus: propagat...
395
  struct inode *hfsplus_new_inode(struct super_block *, umode_t);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
396
  void hfsplus_delete_inode(struct inode *);
02c24a821   Josef Bacik   fs: push i_mutex ...
397
398
  int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
  		       int datasync);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
399
400
  
  /* ioctl.c */
7cc4bcc6f   Arnd Bergmann   hfsplus: Push dow...
401
  long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
402
403
404
405
406
407
408
  int hfsplus_setxattr(struct dentry *dentry, const char *name,
  		     const void *value, size_t size, int flags);
  ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
  			 void *value, size_t size);
  ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size);
  
  /* options.c */
717dd80e9   Roman Zippel   [PATCH] hfs: show...
409
  int hfsplus_parse_options(char *, struct hfsplus_sb_info *);
6f80dfe55   Christoph Hellwig   hfsplus: fix opti...
410
  int hfsplus_parse_options_remount(char *input, int *force);
717dd80e9   Roman Zippel   [PATCH] hfs: show...
411
  void hfsplus_fill_defaults(struct hfsplus_sb_info *);
34c80b1d9   Al Viro   vfs: switch ->sho...
412
  int hfsplus_show_options(struct seq_file *, struct dentry *);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
413

635253915   David Howells   iget: stop HFSPLU...
414
415
  /* super.c */
  struct inode *hfsplus_iget(struct super_block *, unsigned long);
b5fc510c4   Al Viro   get rid of file_f...
416
  int hfsplus_sync_fs(struct super_block *sb, int wait);
635253915   David Howells   iget: stop HFSPLU...
417

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
418
419
420
421
422
423
  /* tables.c */
  extern u16 hfsplus_case_fold_table[];
  extern u16 hfsplus_decompose_table[];
  extern u16 hfsplus_compose_table[];
  
  /* unicode.c */
2753cc281   Anton Salikhmetov   hfsplus: over 80 ...
424
425
426
427
428
429
430
431
  int hfsplus_strcasecmp(const struct hfsplus_unistr *,
  		const struct hfsplus_unistr *);
  int hfsplus_strcmp(const struct hfsplus_unistr *,
  		const struct hfsplus_unistr *);
  int hfsplus_uni2asc(struct super_block *,
  		const struct hfsplus_unistr *, char *, int *);
  int hfsplus_asc2uni(struct super_block *,
  		struct hfsplus_unistr *, const char *, int);
0c21e3aaf   Linus Torvalds   Merge branch 'for...
432
433
  int hfsplus_hash_dentry(const struct dentry *dentry,
  		const struct inode *inode, struct qstr *str);
621e155a3   Nick Piggin   fs: change d_comp...
434
435
436
437
  int hfsplus_compare_dentry(const struct dentry *parent,
  		const struct inode *pinode,
  		const struct dentry *dentry, const struct inode *inode,
  		unsigned int len, const char *str, const struct qstr *name);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
438
439
440
  
  /* wrapper.c */
  int hfsplus_read_wrapper(struct super_block *);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
441
  int hfs_part_find(struct super_block *, sector_t *, sector_t *);
6596528e3   Seth Forshee   hfsplus: ensure b...
442
443
  int hfsplus_submit_bio(struct super_block *sb, sector_t sector,
  		void *buf, void **data, int rw);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
444
445
446
447
448
449
450
451
452
  
  /* time macros */
  #define __hfsp_mt2ut(t)		(be32_to_cpu(t) - 2082844800U)
  #define __hfsp_ut2mt(t)		(cpu_to_be32(t + 2082844800U))
  
  /* compatibility */
  #define hfsp_mt2ut(t)		(struct timespec){ .tv_sec = __hfsp_mt2ut(t) }
  #define hfsp_ut2mt(t)		__hfsp_ut2mt((t).tv_sec)
  #define hfsp_now2mt()		__hfsp_ut2mt(get_seconds())
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
453
  #endif