Whamcloud - gitweb
LU-1861 osd: set proper type for compatibility files
authorMikhail Pershin <tappro@whamcloud.com>
Sun, 25 Nov 2012 19:50:02 +0000 (23:50 +0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 13 Dec 2012 17:24:46 +0000 (12:24 -0500)
The compatibility code in osd-ldiskfs uses osd_compat_add_entry()
to add dir entry for system files, but doesn't type in directory
entry properly so e2fsch complains about that.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I8b1529b3303fba311432f4aa79d71afb6dc992d7
Reviewed-on: http://review.whamcloud.com/4669
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/osd-ldiskfs/osd_compat.c

index 249fa0e..aab00b2 100644 (file)
@@ -345,6 +345,7 @@ int osd_compat_add_entry(struct osd_thread_info *info, struct osd_device *osd,
         inode = &info->oti_inode;
         inode->i_sb = osd_sb(osd);
        osd_id_to_inode(inode, id);
+       inode->i_mode = S_IFREG; /* for type in ldiskfs dir entry */
 
         child = &info->oti_child_dentry;
         child->d_name.hash = 0;