revert-mm-fix-blkdev-size-calculation-in-generic_write_checks
[linux-2.6/linux-trees-mm.git] / fs / reiser4 / plugin / item / acl.h
blobf26762a1c287431ead5dc5c1c0de402a054cd440
1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by reiser4/README */
3 /* Directory entry. */
5 #if !defined( __FS_REISER4_PLUGIN_DIRECTORY_ENTRY_H__ )
6 #define __FS_REISER4_PLUGIN_DIRECTORY_ENTRY_H__
8 #include "../../forward.h"
9 #include "../../dformat.h"
10 #include "../../kassign.h"
11 #include "../../key.h"
13 #include <linux/fs.h>
14 #include <linux/dcache.h> /* for struct dentry */
16 typedef struct directory_entry_format {
17 /* key of object stat-data. It's not necessary to store whole
18 key here, because it's always key of stat-data, so minor
19 packing locality and offset can be omitted here. But this
20 relies on particular key allocation scheme for stat-data, so,
21 for extensibility sake, whole key can be stored here.
23 We store key as array of bytes, because we don't want 8-byte
24 alignment of dir entries.
26 obj_key_id id;
27 /* file name. Null terminated string. */
28 d8 name[0];
29 } directory_entry_format;
31 void print_de(const char *prefix, coord_t * coord);
32 int extract_key_de(const coord_t * coord, reiser4_key * key);
33 int update_key_de(const coord_t * coord, const reiser4_key * key,
34 lock_handle * lh);
35 char *extract_name_de(const coord_t * coord, char *buf);
36 unsigned extract_file_type_de(const coord_t * coord);
37 int add_entry_de(struct inode *dir, coord_t * coord,
38 lock_handle * lh, const struct dentry *name,
39 reiser4_dir_entry_desc * entry);
40 int rem_entry_de(struct inode *dir, const struct qstr *name, coord_t * coord,
41 lock_handle * lh, reiser4_dir_entry_desc * entry);
42 int max_name_len_de(const struct inode *dir);
44 int de_rem_and_shrink(struct inode *dir, coord_t * coord, int length);
46 char *extract_dent_name(const coord_t * coord,
47 directory_entry_format * dent, char *buf);
49 #if REISER4_LARGE_KEY
50 #define DE_NAME_BUF_LEN (24)
51 #else
52 #define DE_NAME_BUF_LEN (16)
53 #endif
55 /* __FS_REISER4_PLUGIN_DIRECTORY_ENTRY_H__ */
56 #endif
58 /* Make Linus happy.
59 Local variables:
60 c-indentation-style: "K&R"
61 mode-name: "LC"
62 c-basic-offset: 8
63 tab-width: 8
64 fill-column: 120
65 End: