Whamcloud - gitweb
LU-2240 osd: change FID of /ROOT on zfs
authorwangdi <di.wang@whamcloud.com>
Sun, 29 Dec 2013 08:08:07 +0000 (00:08 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 15 Mar 2013 20:28:22 +0000 (16:28 -0400)
commitaafe85fac4aa0589185048c57a0cce2b8c6618ee
tree1ccf3c1ebc2ef6df4983509bdce6a937d5e95eca
parent9085c8d6563fd4fd49eea653c8a0d38cfbd0751b
LU-2240 osd: change FID of /ROOT on zfs

Pre-production 2.4 code used FID_SEQ_LOCAL_FILE for /ROOT. With
ldiskfs that FID turns into IGIF which is mapped to MDT0 permanently.
With ZFS original local sequence, was used which makes existing setup
incompatibile with DNE. The intention of the patch is to fix this on
existing ZFS setups and replace FID with one from special FID_SEQ_ROOT
sequence which is mapped to MDT0 as well. For simplicity this is done
in few steps:

 - osd-zfs replaces direntry for /ROOT with the new FID and fixes OI
   so that the new FID is mapped to the same dnode
 - MDD finds all objects listed in /ROOT and updates linkEA properly
 - MDD removes ./.. which may be on disk for pre-production setups
 - finally MDD resets LMA on /ROOT with the new FID, which is later
   used to recognize already converted filesystems (or ones created
   with correct FID from the beginning) and skip this conversion code

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: I03062c6909146f9a3aed72f41c0708f9ef92bb82
Reviewed-on: http://review.whamcloud.com/5249
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
lustre/fld/fld_index.c
lustre/include/lustre_fld.h
lustre/mdd/Makefile.in
lustre/mdd/mdd_compat.c [new file with mode: 0644]
lustre/mdd/mdd_device.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_internal.h
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_oi.c