[LU-1861] osd-ldiskfs doesn't set object file type Created: 07/Sep/12  Updated: 13/Dec/12  Resolved: 13/Dec/12

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

Type: Bug Priority: Blocker
Reporter: Maloo Assignee: Mikhail Pershin
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 3987

 Description   

This issue was created by maloo for Andreas Dilger <adilger@whamcloud.com>

This issue relates to the following test suite run: https://maloo.whamcloud.com/test_sets/8b92f800-f77c-11e1-8b95-52540035b04c.

It seems that when e2fsck is run against an MDT that the file type of the files/directories/objects is not being set in the directory entry. This causes e2fsck to complain about every inode in the filesystem because the ldiskfs_dir_entry_2->file_type is being left unset.

The sub-test test_8 failed with the following error in the test log:

Setting filetype for entry 'last_rcvd' in / (2) to 1.
Setting filetype for entry 'fld' in / (2) to 1.
Setting filetype for entry 'seq_ctl' in / (2) to 1.
Setting filetype for entry 'seq_srv' in / (2) to 1.
Setting filetype for entry 'capa_keys' in / (2) to 1.
Setting filetype for entry 'ROOT' in / (2) to 2.
Setting filetype for entry 'lov_objid' in / (2) to 1.
Setting filetype for entry 'CATALOGS' in / (2) to 1.
Setting filetype for entry '1' in /O/1/d1 (524327) to 1.
Setting filetype for entry '2' in /O/1/d2 (524328) to 1.
Setting filetype for entry '3' in /O/1/d3 (524329) to 1.
Setting filetype for entry '4' in /O/1/d4 (524330) to 1.
:
:


 Comments   
Comment by Mikhail Pershin [ 08/Sep/12 ]

These files are not looking as OST files but MDS. Files in O/1/d<n> are llogs.

CMD: client-24vm3 umount -d /mnt/mds1
CMD: client-24vm3 e2fsck -fy /dev/lvm-MDS/P1
client-24vm3: e2fsck 1.42.3.wc3 (15-Aug-2012)

Right, client-24vm3 is MDS. So bug is related to old master code. I am sure it is fixed in orion already.

Comment by Andreas Dilger [ 05/Oct/12 ]

I just hit this in a new test on a newly-formatted MDT filesystem right after llmount.sh; llumount.sh. Note that it is not ALL of the files that are reporting problems, it seems only a subset of directory entries are missing the file type. Below is a full list on a newly-formatted and mounted filesystem:

noformat
e2fsck -f /dev/vg_sookie/lvmdt1
e2fsck 1.42.5.wc3 (15-Sep-2012)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Setting filetype for entry 'last_rcvd' in / (2) to 1.
Setting filetype for entry 'fld' in / (2) to 1.
Setting filetype for entry 'seq_ctl' in / (2) to 1.
Setting filetype for entry 'seq_srv' in / (2) to 1.
Setting filetype for entry 'lov_objid' in / (2) to 1.
Setting filetype for entry 'CATALOGS' in / (2) to 1.
Setting filetype for entry '1' in /O/1/d1 (25027) to 1.
Setting filetype for entry '2' in /O/1/d2 (25028) to 1.
Setting filetype for entry '3' in /O/1/d3 (25029) to 1.
Setting filetype for entry '4' in /O/1/d4 (50011) to 1.
Setting filetype for entry '5' in /O/1/d5 (50012) to 1.
Setting filetype for entry '6' in /O/1/d6 (50013) to 1.
Setting filetype for entry '7' in /O/1/d7 (50014) to 1.
Setting filetype for entry '8' in /O/1/d8 (50015) to 1.
Setting filetype for entry '9' in /O/1/d9 (50016) to 1.
Setting filetype for entry '10' in /O/1/d10 (50017) to 1.
Setting filetype for entry '12' in /O/1/d12 (50019) to 1.
Setting filetype for entry '14' in /O/1/d14 (50021) to 1.
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

testfs-MDT0000: ***** FILE SYSTEM WAS MODIFIED *****
testfs-MDT0000: 209/100000 files (1.4% non-contiguous), 16988/50000 blocks
noformat

I'm surprised that there are llogs already on a newly-formatted filesystem? It hasn't even done anything yet.

Comment by Mikhail Pershin [ 08/Oct/12 ]

Thanks for checking that, I will investigate that

Comment by Andreas Dilger [ 12/Oct/12 ]

See this also on the OST though:

testfs-OST0000: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Setting filetype for entry 'last_rcvd' in / (2) to 1.
Setting filetype for entry 'health_check' in / (2) to 1.
Setting filetype for entry 'LAST_GROUP' in / (2) to 1.
Setting filetype for entry 'LAST_ID' in /O/0 (80) to 1.
Setting filetype for entry '96' in /O/0/d0 (81) to 1.
Setting filetype for entry '1' in /O/0/d1 (82) to 1.
Setting filetype for entry '97' in /O/0/d1 (82) to 1.
Setting filetype for entry '2' in /O/0/d2 (83) to 1.
:
:
Comment by Alex Zhuravlev [ 13/Oct/12 ]

it's a bit strange this do not happen to MDS ? e.g. sanity/17m does not complain.

Comment by Andreas Dilger [ 13/Oct/12 ]

I see this with test_17m regularly in my local testing. Note that test_17m is relatively new, and the original test failure predates when it was added.

Comment by Mikhail Pershin [ 25/Nov/12 ]

e2fsck complains about file_type in ldiskfs directory entry, which is not set properly by osd_compat_add_entry(), in fact it is not set at all.
I am working on patch, the easiest way could be just set regular type unconditionally there, because all compatibility entries are regular files.

Comment by Mikhail Pershin [ 26/Nov/12 ]

http://review.whamcloud.com/#change,4669

Comment by Peter Jones [ 13/Dec/12 ]

Landed for 2.4

Generated at Sat Feb 10 01:20:19 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.