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

the cached writes are dropped silently if the quota is over limit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • Lustre 2.18.0
    • Lustre 2.17.0, Lustre 2.16.1
    • None
    • 3
    • 9223372036854775807

    Description

      The cached writes on clients will fail with -EDQUOT and dropped silently
      if the current UID/GID/PRJID is over limit.

      the reproducer is as following,

      # ./llmount.sh
      # mkdir /mnt/lustre/tdir
      # lfs project -p 1000 -d -s /mnt/lustre/tdir/
      # lctl set_param osd-ldiskfs.*.quota_slave.root_prj_enable=1
      # lctl conf_param  lustre.quota.ost=ugp
      # lfs setquota -p 1000 -B 300M /mnt/lustre
      
      write data to exceed the quota limit
      # dd if=/dev/zero of=/mnt/lustre/tdir/tfile1 bs=1M
      dd: error writing '/mnt/lustre/tdir/tfile1': Disk quota exceeded
      317+0 records in
      316+0 records out
      
      write data on another client
      # # dd if=/dev/urandom of=/mnt/lustre2/tdir/tfile2 bs=1M count=11+0 records in
      1+0 records out
      1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0152292 s, 68.9 MB/s
      
      sync and drop page cache
      # sync && sync && sync
      # echo 3 >/proc/sys/vm/drop_caches 
      
      the file written above is empty
      # cat /mnt/lustre/tdir/tfile2 >/tmp/tfile_copy
      # ls -al /tmp/tfile_copy 
      -rw-r--r-- 1 root root 0 Jan 16 03:10 /tmp/tfile_copy
      

      the possible reason for it is the "OBD_BRW_SYNC" is set even if the write is not sync

      int osc_io_submit(const struct lu_env *env, struct cl_io *io,
                        const struct cl_io_slice *ios, enum cl_req_type crt,
                        struct cl_2queue *queue)
      {
              ,,,
              osc_page_submit(env, opg, crt, brw_flags);
              ...
      }
      
      void osc_page_submit(const struct lu_env *env, struct osc_page *opg,
                           enum cl_req_type crt, int brw_flags)
      {                                       
              ...
              oap->oap_brw_flags = OBD_BRW_SYNC | brw_flags;
              ...
      }
      

      Attachments

        Activity

          People

            scherementsev Sergey Cheremencev
            hongchao.zhang Hongchao Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated: