Whamcloud - gitweb
LU-13424 mdt: fix DOM entry check 57/38257/3
authorMikhail Pershin <mpershin@whamcloud.com>
Thu, 16 Apr 2020 06:22:17 +0000 (09:22 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Apr 2020 16:48:40 +0000 (16:48 +0000)
commit8f6b0aacc0e905bad7aebddfd838cbd610f17483
tree7184aeadc7253583a58fdb146e0ed79fd6308a1b
parente67a7f7b960a042ae7369e81e4365c6f7e095d25
LU-13424 mdt: fix DOM entry check

The mdt_lmm_dom_entry() tries to determine if layout has
DOM entry or not but does that correctly only if DOM entry
is the first one in layout and file is not mirrored.
Otherwise it scans through all entries and wronly reports
that DOM entry exists.

Patch does the following:
- correct initialization of 'has_dom=false' by default
- correct check for DOM+OST case, only if both entries were
  found among initiated entries
- add test case for directory migration with mirrored file

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I43c33528213132f03ebec2debec48b8d53ee229f
Reviewed-on: https://review.whamcloud.com/38257
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/mdt/mdt_internal.h
lustre/tests/sanity.sh