[LU-4929] create remote directory does not accept mode or handle umask properly Created: 19/Apr/14 Updated: 27/Apr/15 Resolved: 18/Jun/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.6.0, Lustre 2.5.1, Lustre 2.4.3 |
| Fix Version/s: | Lustre 2.6.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | John Hammond | Assignee: | Di Wang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | dne2, mn4 | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 13629 | ||||||||
| Description |
|
The LL_IOC_LMV_SETSTRIPE does not accept a mode for the directory to be created. Moreover umask is not handled in a way consistent with mkdir(). static int ll_dir_setdirstripe(struct inode *dir, struct lmv_user_md *lump,
const char *filename)
{
...
mode = (0755 & (S_IRWXUGO|S_ISVTX) & ~current->fs->umask) | S_IFDIR;
}
t:lustre# umask 0777 t:lustre# mkdir d0 t:lustre# stat d0 File: `d0' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 2c54f966h/743766374d Inode: 216172799293652997 Links: 2 Access: (0000/d---------) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2014-04-18 20:36:53.000000000 -0500 Modify: 2014-04-18 20:36:53.000000000 -0500 Change: 2014-04-18 20:36:53.000000000 -0500 t:lustre# lfs mkdir -c4 d1 t:lustre# stat d1 File: `d1' Size: 16384 Blocks: 8 IO Block: 4096 directory Device: 2c54f966h/743766374d Inode: 216172799293652998 Links: 2 Access: (0000/d---------) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2014-04-18 20:37:00.000000000 -0500 Modify: 2014-04-18 20:37:00.000000000 -0500 Change: 2014-04-18 20:37:00.000000000 -0500 t:lustre# t:lustre# umask 0000 t:lustre# rmdir d0 d1 t:lustre# t:lustre# mkdir d0 t:lustre# lfs mkdir -c4 d1 t:lustre# stat d0 File: `d0' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 2c54f966h/743766374d Inode: 216172799293652999 Links: 2 Access: (0777/drwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2014-04-18 20:37:31.000000000 -0500 Modify: 2014-04-18 20:37:31.000000000 -0500 Change: 2014-04-18 20:37:31.000000000 -0500 t:lustre# stat d1 File: `d1' Size: 16384 Blocks: 8 IO Block: 4096 directory Device: 2c54f966h/743766374d Inode: 216172799293653000 Links: 2 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2014-04-18 20:37:37.000000000 -0500 Modify: 2014-04-18 20:37:37.000000000 -0500 Change: 2014-04-18 20:37:37.000000000 -0500 |
| Comments |
| Comment by Di Wang [ 19/Apr/14 ] |
| Comment by Di Wang [ 25/Apr/14 ] |
|
Just a reminder, when port to 2.4 and 2.5, the test cases in this patch needs to change. |
| Comment by Jodi Levi (Inactive) [ 30/May/14 ] |
|
Patch landed to Master. Please reopen ticket if more work is needed. |
| Comment by Andreas Dilger [ 30/May/14 ] |
|
I hate to reopen this, but we still need a patch to update the man page to describe the new option. |
| Comment by Andreas Dilger [ 30/May/14 ] |
|
Di, since striped directories are not supported in earlier Lustre versions, your comment about back porting this patch are confusing. Is this also affecting remote directory creation? |
| Comment by Di Wang [ 30/May/14 ] |
|
Ah, umask is not working properly for remote directory on 2.4 and 2.5 neither. And also I thought we want to support this -m mode specification for remote directory (or not?). I actually want to say we need different test-cases for 2.4 and 2.5, but it seems just useless and bring confusing, because we do not have striped dir on 2.4 and 2.5 anyway. |
| Comment by Andreas Dilger [ 31/May/14 ] |
|
Yes, if this affects remote directories also then it should be backported to b2_4 and b2_5. The reason that the bug was reopened was because the man page also needs to be updated for master. The backport is tracked separately. |
| Comment by Peter Jones [ 05/Jun/14 ] |
|
Raising priority to ensure man page update gets in ahead of the release |
| Comment by Di Wang [ 08/Jun/14 ] |
| Comment by Peter Jones [ 18/Jun/14 ] |
|
Landed for 2.6 |