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

Small writes are not blocked by quota enforcement.

    XMLWordPrintable

Details

    • Requirement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • 10
    • 3
    • 9223372036854775807

    Description

      Attached script can be used to re-create the issue. Even after the soft limit is reached and the client knows that the soft limit has expired, the client can still perform small writes and continue writing until the hard limit is reached. This appears to be a flaw in the code (please let me know if this understanding is correct).

      While debugging the issue, I observed that osc_quota_chkdq() returns EDQUOTA because cl_quota_exceeded_ids is set, and "cl_quota_exceeded_ids" flag set happens during the last failed write transaction. After this point, my assumption was that any further writes would be blocked. However, writes are still allowed because the client relies on the server to fail the write. Since the write is queued and sync is called. In the case of small I/O the write may not reach the server (I still need to verify this). In contrast, when the write size matches the cache size, the write does reach the server and an EDQUOTA error is returned.

      I have included the return codes for 1 KB and 1 MB writes, which explain why the 1 MB write fails (the cache size is set to 1 MB).

      My question is: should we use the return value of osc_quota_chkdq() to prevent the I/O from being queued? Or does this require more consideration? I understand that once the client detects an expired quota, we should not allow further writes, but we still need to allow deletes so that pages can be released. I would appreciate input on this before proposing a fix and later realizing that a change was not required.

      Return code :---
      1K write
      osc_quota_chkdq rc=-122
      osc_queue_async_io rc=-122
      osc_page_cache_add rc=-122
      cl_io_commit_async rc=-122
      cl_io_commit_async rc=-122
      cl_io_submit_rw rc=0
      cl_io_submit_rw rc=0
      cl_sync_io_wait rc=0
      vvp_io_commit_sync rc=1024
      vvp_io_write_commit rc=0
      vvp_io_write_start rc=0

      2MB return code:-
      osc_quota_chkdq rc=-122
      osc_queue_async_io rc=-122
      osc_page_cache_add rc=-122
      cl_io_commit_async rc=-122
      cl_io_commit_async rc=-122
      cl_io_submit_rw rc=0
      cl_io_submit_rw rc=0
      cl_sync_io_wait rc=-122
      vvp_io_commit_sync rc=-122
      vvp_io_write_commit rc=-122
      vvp_io_write_start rc=-122

      Attachments

        Activity

          People

            rajeevm Rajeev Mishra
            rajeevm Rajeev Mishra
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: