Whamcloud - gitweb
LU-16061 osd-ldiskfs: clear EXTENT_FL for symlink agent inode 93/48093/2
authorAlexander Zarochentsev <alexander.zarochentsev@hpe.com>
Fri, 29 Jul 2022 19:38:09 +0000 (22:38 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 19 Aug 2022 04:32:18 +0000 (04:32 +0000)
The flag should be cleared for "fast" symlinks otherwise
e2fsck complains about inode correctness.
New agent inodes of symlink type may have EXT4_EXTENT_FL flag
set if the fs has "extent" feature and it is not cleared as in
other places where "fast" symlinks are created.

HPE-bug-id: LUS-10237

Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: Ib7b807bb1298cc3a9fd4fdba35747b4bda6fe034
Reviewed-on: https://review.whamcloud.com/48093
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c

index ab7facf..a3bbd15 100644 (file)
@@ -3989,6 +3989,7 @@ static struct inode *osd_create_local_agent_inode(const struct lu_env *env,
         */
        if (S_ISLNK(type)) {
                BUILD_BUG_ON(LDISKFS_N_BLOCKS * 4 < FID_LEN + 1);
         */
        if (S_ISLNK(type)) {
                BUILD_BUG_ON(LDISKFS_N_BLOCKS * 4 < FID_LEN + 1);
+               ldiskfs_clear_inode_flag(local, LDISKFS_INODE_EXTENTS);
                rc = scnprintf((char *)LDISKFS_I(local)->i_data,
                               LDISKFS_N_BLOCKS * 4, DFID, PFID(fid));
 
                rc = scnprintf((char *)LDISKFS_I(local)->i_data,
                               LDISKFS_N_BLOCKS * 4, DFID, PFID(fid));