Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-4929

create remote directory does not accept mode or handle umask properly

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Lustre 2.6.0, Lustre 2.5.1, Lustre 2.4.3
    • Lustre 2.6.0
    • 3
    • 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
      

      Attachments

        Issue Links

          Activity

            People

              di.wang Di Wang
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: