Whamcloud - gitweb
b=19505 changelogs - distinguish between SETATTR and [acm]time changes
[fs/lustre-release.git] / lustre / include / lustre / lustre_user.h
index f56f4b4..d3fdb28 100644 (file)
 #ifndef _LUSTRE_USER_H
 #define _LUSTRE_USER_H
 
+/** \defgroup lustreuser lustreuser
+ *
+ * @{
+ */
+
 #include <lustre/ll_fiemap.h>
 #if defined(__linux__)
 #include <linux/lustre_user.h>
@@ -324,7 +329,11 @@ typedef struct lu_fid lustre_fid;
 
 /* scanf input parse format -- strip '[' first.
    e.g. sscanf(fidstr, SFID, RFID(&fid)); */
-#define SFID "0x%llx:0x%x:0x%x"
+/* #define SFID "0x"LPX64i":0x"LPSZX":0x"LPSZX""
+liblustreapi.c:2893: warning: format '%lx' expects type 'long unsigned int *', but argument 4 has type 'unsigned int *'
+liblustreapi.c:2893: warning: format '%lx' expects type 'long unsigned int *', but argument 5 has type 'unsigned int *'
+*/
+#define SFID "0x"LPX64i":0x%x:0x%x"
 #define RFID(fid)     \
         &((fid)->f_seq), \
         &((fid)->f_oid), \
@@ -468,6 +477,7 @@ enum changelog_rec_type {
         CL_SETATTR  = 14,
         CL_XATTR    = 15,
         CL_HSM      = 16, /* HSM specific events, see flags */
+        CL_TIME     = 17, /* mtime, atime, ctime change only */
         CL_LAST
 };
 
@@ -475,7 +485,7 @@ static inline const char *changelog_type2str(int type) {
         static const char *changelog_str[] = {
                 "MARK",  "CREAT", "MKDIR", "HLINK", "SLINK", "MKNOD", "UNLNK",
                 "RMDIR", "RNMFM", "RNMTO", "OPEN",  "CLOSE", "IOCTL", "TRUNC",
-                "SATTR", "XATTR", "HSM"   };
+                "SATTR", "XATTR", "HSM",   "TIME"  };
         if (type >= 0 && type < CL_LAST)
                 return changelog_str[type];
         return NULL;
@@ -589,5 +599,6 @@ static __inline__ struct hsm_action_item * hai_next(struct hsm_action_item *hai)
                                           cfs_size_round(hai->hai_len));
 }
 
+/** @} lustreuser */
 
 #endif /* _LUSTRE_USER_H */