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

setfsuid() and quotas

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Minor
    • None
    • Lustre 2.1.0
    • None
    • RedHat 6.0
    • 3
    • 6416

    Description

      The following code as root doesn't raise "EDQUOT" error on Lustre even if the user "ME" exceeded its data quota:

      #define SIZE 10240
      #define ME 500

      int main( int argc, char * argv[] )

      { char * buff = NULL ; int fd =0 ; buff = malloc( SIZE ) ; setfsuid( ME ) ; fd = open( argv[1], O_CREAT|O_RDWR, 0644 ) ; printf( "buff=%p, errno=%u\n", buff, errno ) ; printf( "fd = %d\n", fd ) ; printf( "bytes written = %d, errno=%u\n", write( fd, buff, SIZE), errno ); printf( "fsync:%d errno=%u\n", fsync( fd ), errno ) ; printf( "close:%d errno=%u\n", close( fd ), errno ) ; }

      Running it returns no error even if user 500 is out of data quota:
      buff=0xee8010, errno=0
      fd = 3
      bytes written = 10240, errno=0
      fsync:0 errno=0
      close:0 errno=0

      The issue is only for data quota. setfsuid() works fine for inode quota.

      Attachments

        1. reproducer_v2.c
          2 kB
        2. setfsuid.c
          0.6 kB

        Activity

          People

            niu Niu Yawei (Inactive)
            leibovici-cea Thomas LEIBOVICI - CEA (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: