]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/directory.h
Use st_ino in dircache for files
[netatalk.git] / include / atalk / directory.h
index e9b3c23838c8e64e2973f80bf206a4cd48be2c06..8fb331559a667f3c2804ee524b898fe5caf874f5 100644 (file)
 #define DIRDID_ROOT_PARENT    htonl(1)  /* parent directory of root */
 #define DIRDID_ROOT           htonl(2)  /* root directory */
 
+/* struct dir.d_flags */
+#define DIRF_FSMASK       (3<<0)
+#define DIRF_NOFS         (0<<0)
+#define DIRF_AFS          (1<<0)
+#define DIRF_UFS          (1<<1)
+#define DIRF_ISFILE    (1<<3) /* it's cached file, not a directory */
+#define DIRF_OFFCNT    (1<<4) /* offsprings count is valid */
+#define DIRF_CNID         (1<<5) /* renumerate id */
+
 struct dir {
-    bstring     d_fullpath;          /* complete unix path to dir */
+    bstring     d_fullpath;          /* complete unix path to dir (or file) */
     bstring     d_m_name;            /* mac name */
     bstring     d_u_name;            /* unix name                                          */
                                      /* be careful here! if d_m_name == d_u_name, d_u_name */
@@ -64,7 +73,8 @@ struct dir {
     uint16_t    d_vid;                /* only needed in the dircache, because
                                          we put all directories in one cache. */
     /* Stuff used in the dircache */
-    time_t      ctime_dircache;       /* inode ctime, used and modified by dircache */
+    time_t      dcache_ctime;         /* inode ctime, used and modified by dircache */
+    ino_t       dcache_ino;           /* inode number, used to detect changes in the dircache */
 };
 
 struct path {