[LU-13852] PCC lookup(IT_OPEN) shouldn't alloc FID in LLITE Created: 04/Aug/20  Updated: 04/Aug/21  Resolved: 27/May/21

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.12.0
Fix Version/s: Lustre 2.15.0

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

Issue Links:
Related
is related to LU-14039 Set LA_TYPE while working on osp-mdt ... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In ll_lookup_it(IT_OPEN) is called by PCC, it always allocates FID on MDT0 for this new file, but if parent directory is striped or is remote, it will cause this create RPC sent to the MDT where its name hash points to, but not where its FID belongs to, and finally it will trigger assertion in osp_md_create:

[22573.885685] LustreError: 29626:0:(osp_md_object.c:167:osp_md_create()) ASSERTION( attr->la_valid & LA_TYPE ) failed: 
[22573.886840] LustreError: 29626:0:(osp_md_object.c:167:osp_md_create()) LBUG
[22573.887513] Pid: 29626, comm: mdt00_000 3.10.0-1127.8.2.el7_lustre.x86_64 #1 SMP Wed Jul 22 17:22:45 UTC 2020
[22573.888637] Call Trace:
[22573.889029]  [] libcfs_call_trace+0x8c/0xc0 [libcfs]
[22573.890130]  [] lbug_with_loc+0x4c/0xa0 [libcfs]
[22573.891078]  [] osp_md_create+0x442/0x490 [osp]
[22573.892202]  [] lod_sub_create+0x1f5/0x480 [lod]
[22573.893094]  [] lod_create+0x54/0x2d0 [lod]
[22573.893698]  [] mdd_create_object_internal+0xae/0x2f0 [mdd]
[22573.894630]  [] mdd_create_object+0x83/0x940 [mdd]
[22573.895450]  [] mdd_create+0xf3f/0x1690 [mdd]
[22573.896197]  [] mdt_reint_open+0x2413/0x3270 [mdt]
[22573.897188]  [] mdt_reint_rec+0x83/0x210 [mdt]
[22573.897812]  [] mdt_reint_internal+0x720/0xaf0 [mdt]
[22573.898654]  [] mdt_intent_open+0x82/0x3a0 [mdt]
[22573.899522]  [] mdt_intent_opc+0x1ba/0xb40 [mdt]
[22573.900292]  [] mdt_intent_policy+0x1a4/0x360 [mdt]
[22573.901200]  [] ldlm_lock_enqueue+0x3cb/0xad0 [ptlrpc]
[22573.902216]  [] ldlm_handle_enqueue0+0xa56/0x1610 [ptlrpc]
[22573.903120]  [] tgt_enqueue+0x62/0x210 [ptlrpc]
[22573.903966]  [] tgt_request_handle+0x96a/0x1640 [ptlrpc]
[22573.904718]  [] ptlrpc_server_handle_request+0x256/0xb10 [ptlrpc]
[22573.905691]  [] ptlrpc_main+0xb3c/0x14d0 [ptlrpc]
[22573.906627]  [] kthread+0xd1/0xe0
[22573.907307]  [] ret_from_fork_nospec_end+0x0/0x39
[22573.908266]  [] 0xffffffffffffffff
[22573.908991] Kernel panic - not syncing: LBUG


 Comments   
Comment by Gerrit Updater [ 04/Aug/20 ]

Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39568
Subject: LU-13852 pcc: don't alloc FID in LLITE for pcc open
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 222cf854031cbb14e3a42b5646e12c44be5f7482

Comment by Andreas Dilger [ 05/Aug/20 ]

We also should't LASSERT() on the MDS from something bad that the client sent... The MDS should just return an error in that case.

Comment by Gerrit Updater [ 27/May/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39568/
Subject: LU-13852 pcc: don't alloc FID in LLITE for pcc open
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 223728a97c397e6e6c91808dd36a2539705f00b8

Comment by Peter Jones [ 27/May/21 ]

Landed for 2.15

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