[LU-14510] FIEMAP does not work on DoM files Created: 10/Mar/21  Updated: 10/Mar/21

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.14.0, Lustre 2.12.6, Lustre 2.15.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Andreas Dilger Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: DoM2, e2fsprogs

Issue Links:
Related
is related to LU-11848 filefrag/FIEMAP doesn't work for PFL ... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Creating a DoM PFL file and then running "filefrag -v" on it (ioctl(FIEMAP)) does not work:

# lfs setstripe -E 1M -L mdt -E 16m -c 4 -E eof -c -1 /mnt/testfs/dom-pfl
# dd if=/dev/zero of=/mnt/testfs/dom-pfl2 bs=1M count=1
# filefrag -v /mnt/testfs/dom-pfl2
Filesystem type is: bd00bd0
File size of /mnt/testfs/dom-pfl2 is 1048576 (1024 blocks of 1024 bytes)
/mnt/testfs/dom-pfl2: FIBMAP unsupported

The "FIBMAP unsupported" message is a bit misleading, since it tries FIEMAP first, but falls back to FIBMAP if that doesn't work.



 Comments   
Comment by Andreas Dilger [ 10/Mar/21 ]

One issue that we need to decide is what the "device number" should be for MDT components of a file? Currently, we use device "0..nnnn" to represent OST0000..OSTxxxx, so we would have to use some other numbering for the MDT. While this is a 32-bit number and we only allow up to 65536 OSTs, unfortunately the high 16 bits were already consumed by storing the component number for LU-11848 to handle PFL files.

Another option would be to use an extent flag like FIEMAP_EXTENT_DATA_INLINE to indicate the data is being stored on the MDS. Strictly speaking, the FIEMAP_EXTENT_DATA_INLINE flag indicates that the data is stored inside the inode, and at some point we may want to allow this with the inline_data feature, but it might be a convenient short-term hack. A better solution would be to have a new flag like FIEMAP_EXTENT_METADATA=0x40000000, but it has some chance of conflict with other flags in the future unless we can add some upstream functionality that also uses this flag.

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