Whamcloud - gitweb
LU-3279 changelog: fix CL_LAYOUT comment, string
authorAndreas Dilger <andreas.dilger@intel.com>
Tue, 14 May 2013 21:50:37 +0000 (15:50 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 15 May 2013 17:31:30 +0000 (13:31 -0400)
Fix the CL_LAYOUT comment, since it is possible that layout swap
could be used in cases where the file content is changed.  I don't
think there are any real world use cases for this, but that depends
on what tools are being used on the filesystem.

Also change the "LAYOUT" string for this ChangeLog record type to
be "LYOUT" to match the convention of other strings to only be
5 characters long.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ibf9a57216e0c45a1e15cef9cfe5ee7f509500c1e
Reviewed-on: http://review.whamcloud.com/6338
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre/lustre_user.h

index 1de22e4..59a0931 100644 (file)
@@ -647,7 +647,7 @@ enum changelog_rec_type {
         CL_EXT      = 9,  /* namespace extended record (2nd half of rename) */
         CL_OPEN     = 10, /* not currently used */
         CL_CLOSE    = 11, /* may be written to log only with mtime change */
         CL_EXT      = 9,  /* namespace extended record (2nd half of rename) */
         CL_OPEN     = 10, /* not currently used */
         CL_CLOSE    = 11, /* may be written to log only with mtime change */
-       CL_LAYOUT   = 12, /* file layout/striping modified, no data changed */
+       CL_LAYOUT   = 12, /* file layout/striping modified */
        CL_TRUNC    = 13,
        CL_SETATTR  = 14,
        CL_XATTR    = 15,
        CL_TRUNC    = 13,
        CL_SETATTR  = 14,
        CL_XATTR    = 15,
@@ -661,7 +661,7 @@ enum changelog_rec_type {
 static inline const char *changelog_type2str(int type) {
        static const char *changelog_str[] = {
                "MARK",  "CREAT", "MKDIR", "HLINK", "SLINK", "MKNOD", "UNLNK",
 static inline const char *changelog_type2str(int type) {
        static const char *changelog_str[] = {
                "MARK",  "CREAT", "MKDIR", "HLINK", "SLINK", "MKNOD", "UNLNK",
-               "RMDIR", "RENME", "RNMTO", "OPEN",  "CLOSE", "LAYOUT", "TRUNC",
+               "RMDIR", "RENME", "RNMTO", "OPEN",  "CLOSE", "LYOUT", "TRUNC",
                "SATTR", "XATTR", "HSM",   "MTIME", "CTIME", "ATIME",
        };
 
                "SATTR", "XATTR", "HSM",   "MTIME", "CTIME", "ATIME",
        };