[LU-9371] "lfs find" should find the files that match all the specified component options Created: 20/Apr/17  Updated: 03/Jun/17  Resolved: 03/Jun/17

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

Type: Bug Priority: Critical
Reporter: Emoly Liu Assignee: Niu Yawei (Inactive)
Resolution: Fixed Votes: 0
Labels: pfl

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When testing "lfs find" with composite files, I found it returned the file which only matched any of the specified component options, but not all.
For example, if you run the following commands, you will see it return /mnt/lustre/testfile.

lfs setstripe -E 1M -c 2 -E 4M -c -1 -i 0 -E -1 /mnt/lustre/testfile
lfs find /mnt/lustre --component-start=-100M --component-end=+5M

It shouldn't return any file because there is no file whose start>100M and end<5M.



 Comments   
Comment by Andreas Dilger [ 20/Apr/17 ]

Except what you asked for is component start < 100MB and component end > 5Mb, which matches the first component.

Comment by Niu Yawei (Inactive) [ 20/Apr/17 ]

Right, 100M means at most 100M, and 5M means at least 5M, I was also confused by these '' and '' before and made it reversely in 'lfs getstripe' options.

Regardless this improper example, there is a real problem found by Emoly, current implementation is that file will be matched if the criteria are matched by any components, for exmaple: if 1st component matches --component-start option, and 2nd component matches --component-end option, the file will be matched at the end. I think it make sense to change it as any single component matches all criteria.

Comment by Gerrit Updater [ 21/Apr/17 ]

Niu Yawei (yawei.niu@intel.com) uploaded a new patch: https://review.whamcloud.com/26766
Subject: LU-9371 tools: handle component options properly
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: cdced3718893e2ae19d2ba6aa2c864e152a4f1be

Comment by Gerrit Updater [ 03/Jun/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26766/
Subject: LU-9371 tools: handle component options properly
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8e02647def0d806023cb3bb4b91c5b1e38ee2872

Comment by Peter Jones [ 03/Jun/17 ]

Landed for 2.10

Generated at Sat Feb 10 02:25:36 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.