Commit | Line | Data |
---|---|---|
b3b94faa DT |
1 | /* |
2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | |
3 | * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. | |
4 | * | |
5 | * This copyrighted material is made available to anyone wishing to use, | |
6 | * modify, copy, or redistribute it subject to the terms and conditions | |
7 | * of the GNU General Public License v.2. | |
8 | */ | |
9 | ||
10 | #ifndef __DIR_DOT_H__ | |
11 | #define __DIR_DOT_H__ | |
12 | ||
13 | /** | |
14 | * gfs2_filldir_t - Report a directory entry to the caller of gfs2_dir_read() | |
15 | * @opaque: opaque data used by the function | |
16 | * @name: the name of the directory entry | |
17 | * @length: the length of the name | |
18 | * @offset: the entry's offset in the directory | |
19 | * @inum: the inode number the entry points to | |
20 | * @type: the type of inode the entry points to | |
21 | * | |
22 | * Returns: 0 on success, 1 if buffer full | |
23 | */ | |
24 | ||
25 | typedef int (*gfs2_filldir_t) (void *opaque, | |
26 | const char *name, unsigned int length, | |
27 | uint64_t offset, | |
28 | struct gfs2_inum *inum, unsigned int type); | |
29 | ||
30 | int gfs2_filecmp(struct qstr *file1, char *file2, int len_of_file2); | |
31 | int gfs2_dirent_alloc(struct gfs2_inode *dip, struct buffer_head *bh, | |
32 | int name_len, struct gfs2_dirent **dent_out); | |
33 | ||
34 | int gfs2_dir_search(struct gfs2_inode *dip, struct qstr *filename, | |
35 | struct gfs2_inum *inum, unsigned int *type); | |
36 | int gfs2_dir_add(struct gfs2_inode *dip, struct qstr *filename, | |
37 | struct gfs2_inum *inum, unsigned int type); | |
38 | int gfs2_dir_del(struct gfs2_inode *dip, struct qstr *filename); | |
39 | int gfs2_dir_read(struct gfs2_inode *dip, uint64_t * offset, void *opaque, | |
40 | gfs2_filldir_t filldir); | |
41 | int gfs2_dir_mvino(struct gfs2_inode *dip, struct qstr *filename, | |
42 | struct gfs2_inum *new_inum, unsigned int new_type); | |
43 | ||
44 | int gfs2_dir_exhash_dealloc(struct gfs2_inode *dip); | |
45 | ||
46 | int gfs2_diradd_alloc_required(struct gfs2_inode *dip, struct qstr *filename, | |
47 | int *alloc_required); | |
48 | ||
49 | int gfs2_get_dir_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub); | |
50 | ||
51 | #endif /* __DIR_DOT_H__ */ |