]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - fs/gfs2/dir.h
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
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.
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
22 * Returns: 0 on success, 1 if buffer full
25 typedef int (*gfs2_filldir_t
) (void *opaque
,
26 const char *name
, unsigned int length
,
28 struct gfs2_inum
*inum
, unsigned int type
);
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
);
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
);
44 int gfs2_dir_exhash_dealloc(struct gfs2_inode
*dip
);
46 int gfs2_diradd_alloc_required(struct gfs2_inode
*dip
, struct qstr
*filename
,
49 #endif /* __DIR_DOT_H__ */