[LU-2561] Newly created file is same size as directory Created: 02/Jan/13 Updated: 04/Jul/17 Resolved: 28/Jan/13 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.4.0 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Christopher Morrone | Assignee: | Lai Siyao |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | MB, sequoia | ||
| Environment: |
Lustre 2.3.54-2chaos, 2.3.57-2chaos. (github.com/chaos/lustre) ZFS OSTs. |
||
| Issue Links: |
|
||||||||||
| Sub-Tasks: |
|
||||||||||
| Severity: | 3 | ||||||||||
| Rank (Obsolete): | 5987 | ||||||||||
| Description |
|
We have a subdirectory where any newly created files, e.g. "touch newfile", is created with a file size that matches the size of the directory, as listed in "ls -la .". I'm not sure yet what is specially about this directory. I can't reproduce the problem in directories that I just "mkdir" myself. However, if "cp -a" the problem subdirectory somewhere else in the filesystem, I AM able to then recreate the problem there. In the original problem directory, the directory size is 10720, and any newly created file is 10720 in size. In one copy that I made, the directory size is 9728 bytes, and any newly created files are 9728 bytes. Very strange. I'm not yet sure what is special about the directory contents that makes it able to trigger this bug. I am able to read the files, and they just contain zeroes. |
| Comments |
| Comment by Christopher Morrone [ 02/Jan/13 ] |
|
Ned Bass came through with a reproducer! Found a reproducer. Seems to be related to having a system.posix_acl_default xattr. # grove530 /p/lstest/bass6 > mkdir test # grove530 /p/lstest/bass6 > cd test # grove530 /p/lstest/bass6/test > getfacl --access . | setfacl -d -M- . # grove530 /p/lstest/bass6/test > touch x # grove530 /p/lstest/bass6/test > ls -al total 12 drwx------+ 2 root root 5632 Jan 2 17:32 . drwx------+ 3 bass6 bass6 5632 Jan 2 17:32 .. -rw------- 1 root root 5632 Jan 2 17:32 x # grove530 /p/lstest/bass6/test > getfattr -d -m. . # file: . system.posix_acl_default=0sAgAAAAEABwD/////BAAAAP////8gAAAA/////w== [cut] |
| Comment by Peter Jones [ 03/Jan/13 ] |
|
Lai Could you please look into this one? Thanks Peter |
| Comment by Ned Bass [ 03/Jan/13 ] |
|
I verified that this occurs with both ldiskfs and ZFS backends. |
| Comment by Lai Siyao [ 05/Jan/13 ] |
|
The cause is that mdd_declare_create() mistakenly declare attr set on child when default acl exists for parent, instead this should be done for parent and when child is directory only. I'll commit a fix later. |
| Comment by Lai Siyao [ 05/Jan/13 ] |
|
Patch is on http://review.whamcloud.com/#change,4956 |
| Comment by Christopher Morrone [ 21/Jan/13 ] |
|
Patch works for us. Just needs landing at this point. Removing "topsequoia" label. |
| Comment by Christopher Morrone [ 28/Jan/13 ] |
|
Patch 4956 landed on master. Ticket can be closed. |