mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-20 06:54:28 +00:00
Update format for readdir_pos
We now track each parent dir's next readdir pos and the readdir pos of each dirent. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -380,6 +380,7 @@ struct scoutfs_inode {
|
||||
__le64 blocks;
|
||||
__le64 link_counter;
|
||||
__le64 data_version;
|
||||
__le64 next_readdir_pos;
|
||||
__le32 nlink;
|
||||
__le32 uid;
|
||||
__le32 gid;
|
||||
@@ -403,6 +404,7 @@ struct scoutfs_inode {
|
||||
struct scoutfs_dirent {
|
||||
__le64 ino;
|
||||
__le64 counter;
|
||||
__le64 readdir_pos;
|
||||
__u8 type;
|
||||
__u8 name[0];
|
||||
} __packed;
|
||||
@@ -435,6 +437,7 @@ struct scoutfs_dirent {
|
||||
#define SCOUTFS_DIRENT_OFF_BITS 31
|
||||
#define SCOUTFS_DIRENT_OFF_MASK ((1U << SCOUTFS_DIRENT_OFF_BITS) - 1)
|
||||
/* getdents returns next pos with an entry, no entry at (f_pos)~0 */
|
||||
#define SCOUTFS_DIRENT_FIRST_POS 2
|
||||
#define SCOUTFS_DIRENT_LAST_POS (INT_MAX - 1)
|
||||
|
||||
enum {
|
||||
|
||||
Reference in New Issue
Block a user