From 6bcdca3cf9fa6a640060c3e7602be8cf183fa7f4 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 10 Feb 2017 09:56:45 -0800 Subject: [PATCH] Update dirent last pos and update first comment The last valid pos for us is now a full u64 because we're storing entries at an increasing counter instead of at a hahs of the entry name. And might as well add a clarifying comment to the first pos while we're here. Signed-off-by: Zach Brown --- kmod/src/format.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kmod/src/format.h b/kmod/src/format.h index 77945486..a3784bcb 100644 --- a/kmod/src/format.h +++ b/kmod/src/format.h @@ -483,9 +483,10 @@ 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 */ +/* entries begin after . and .. */ #define SCOUTFS_DIRENT_FIRST_POS 2 -#define SCOUTFS_DIRENT_LAST_POS (INT_MAX - 1) +/* getdents returns next pos with an entry, no entry at (f_pos)~0 */ +#define SCOUTFS_DIRENT_LAST_POS (U64_MAX - 1) enum { SCOUTFS_DT_FIFO = 0,