[LU-15502] mkdir returns -EBADF if default LMV is set in 2.12 client <-> 2.14 MDS system Created: 29/Jan/22  Updated: 14/Sep/22  Resolved: 30/May/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.14.0, Lustre 2.12.8
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Critical
Reporter: Lai Siyao Assignee: Lai Siyao
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Cloners
Related
is related to LU-14459 DNE3: directory auto split during create Open
is related to LU-15692 performance regressions for files in ... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

From 2.14, if client doesn't specify default LMV hash type, MDS will use the default one (from tunable option lod.*.mdt_hash). But before 2.14, default LMV hash type should be set explicitly, otherwise in real creation time mkdir will returns -EBADF.

2.12.6 is running on server and 2.14.0 is running on the client.

# mkdir /testfs/dir0
# lfs setdirstripe -c -1 -D /testfs/dir0/
# mkdir /testfs/dir0/testdir
# mkdir /testfs/dir0/testdir/subdir
mkdir: cannot create directory ‘/testfs/dir0/testdir/subdir’: Bad file descriptor


 Comments   
Comment by Gerrit Updater [ 29/Jan/22 ]

"Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/46378
Subject: LU-15502 llite: set default LMV hash type with 2.12 MDS
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5f8c85a4616153ac693652109ccf42c9dbf416a1

Comment by Andreas Dilger [ 30/Jan/22 ]

What I don't understand is why this wasn't hit during interop testing?

Is it because the default layout was set with a hash that the MDS doesn't understand, but it allowed this to be set and only complained when it was actually used? That seems like a but in the 2.12 MDS code, it should either return an error when the default hash is set,

Comment by Andreas Dilger [ 30/Jan/22 ]

It looks like the important sanity test_300[gkmn] tests that would have caught this during normal review testing were all being skipped because they are run with mdtcount=1.

Could you please submit a second test patch based on patch 46378 that makes some minor cleanup (e.g. replace spaces with tabs in lustre/mdt/mdt_open.c) and adds:

Test-Parameters: trivial testlist=sanity,sanityn mdtcount=2 serverversion=2.12

so that we get a full set of tests run in this config. I didn't want to run a full set of tests for your patch, since they may fail for other reasons, so I limited it to ONLY=300.

Comment by Gerrit Updater [ 30/Jan/22 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/46385
Subject: LU-15502 mdt: cleanup whitespace in mdt_open.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3b5ad1e2cc6442e8733b85b29b08625e37457c4f

Comment by Gerrit Updater [ 07/Feb/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46378/
Subject: LU-15502 llite: set default LMV hash type with 2.12 MDS
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 51c6d596d4f3e82decb037c02e8b5d095e0a4962

Comment by Gerrit Updater [ 30/May/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46385/
Subject: LU-15502 mdt: cleanup whitespace in mdt_open.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ff1d982b6d8a9683c16d2dcc291d8fe47904ebbe

Comment by Peter Jones [ 30/May/22 ]

Landed for 2.16

Generated at Sat Feb 10 03:18:51 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.