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

ll_fsync() does not mark writeback errors as seen

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      When dirty pages are discarded, for example on eviction, vvp_vmpage_error() records -EIO in mapping ->wb_err with mapping_set_error().

      ll_fsync() only calls filemap_write_and_wait_range(). It never calls file_check_and_advance_wb_err(), so the error is never marked as seen (ERRSEQ_SEEN).

      Because the error is never seen, errseq_sample() returns 0 for every new open of the inode. filemap_check_wb_err() then reports the same old error again, on every open, until the inode is evicted from the cache.

      This causes problems for a Lustre client re-exported with NFS. knfsd closes and reopens files often (filecache GC), so it sees the error each time and calls nfsd_reset_write_verifier(). The write verifier changes every few seconds, and NFS clients must resend all uncommitted writes.

       

      How to reproduce:

      1. Write to a file on a Lustre client that is exported by knfsd.
      2. Evict the client while it has dirty pages:
         lctl set_param obdfilter.*.evict_client=nid:<client nid>
      3. Keep the file open and closed through NFS. The write verifier changes again and again, and NFS writes to the file get EIO.

      echo 3 > /proc/sys/vm/drop_caches together with lctl set_param ldlm.namespaces.*.lru_size=clear stops it, because both evict the inode.

       

            skoyama Sohei Koyama
            skoyama Sohei Koyama
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: