1. 07 7月, 2017 2 次提交
  2. 04 5月, 2017 3 次提交
    • J
      ceph: when seeing write errors on an inode, switch to sync writes · 26544c62
      Jeff Layton 提交于
      Currently, we don't have a real feedback mechanism in place for when we
      start seeing buffered writeback errors. If writeback is failing, there
      is nothing that prevents an application from continuing to dirty pages
      that aren't being cleaned.
      
      In the event that we're seeing write errors of any sort occur on an
      inode, have the callback set a flag to force further writes to be
      synchronous. When the next write succeeds, clear the flag to allow
      buffered writeback to continue.
      
      Since this is just a hint to the write submission mechanism, we only
      take the i_ceph_lock when a lockless check shows that the flag needs to
      be changed.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: N"Yan, Zheng” <zyan@redhat.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      26544c62
    • J
      Revert "ceph: SetPageError() for writeback pages if writepages fails" · 6fc1fe5e
      Jeff Layton 提交于
      This reverts commit b109eec6.
      
      If I'm filling up a filesystem with this sort of command:
      
          $ dd if=/dev/urandom of=/mnt/cephfs/fillfile bs=2M oflag=sync
      
      ...then I'll eventually get back EIO on a write. Further calls
      will give us ENOSPC.
      
      I'm not sure what prompted this change, but I don't think it's what we
      want to do. If writepages failed, we will have already set the mapping
      error appropriately, and that's what gets reported by fsync() or
      close().
      
      __filemap_fdatawait_range however, does this:
      
      	wait_on_page_writeback(page);
      	if (TestClearPageError(page))
      		ret = -EIO;
      
      ...and that -EIO ends up trumping the mapping's error if one exists.
      
      When writepages fails, we only want to set the error in the mapping,
      and not flag the individual pages.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: N"Yan, Zheng” <zyan@redhat.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      6fc1fe5e
    • J
      libceph: allow requests to return immediately on full conditions if caller wishes · a1f4020a
      Jeff Layton 提交于
      Usually, when the osd map is flagged as full or the pool is at quota,
      write requests just hang. This is not what we want for cephfs, where
      it would be better to simply report -ENOSPC back to userland instead
      of stalling.
      
      If the caller knows that it will want an immediate error return instead
      of blocking on a full or at-quota error condition then allow it to set a
      flag to request that behavior.
      
      Set that flag in ceph_osdc_new_request (since ceph.ko is the only caller),
      and on any other write request from ceph.ko.
      
      A later patch will deal with requests that were submitted before the new
      map showing the full condition came in.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NIlya Dryomov <idryomov@gmail.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      a1f4020a
  3. 21 4月, 2017 1 次提交
  4. 02 3月, 2017 1 次提交
  5. 28 2月, 2017 1 次提交
  6. 25 2月, 2017 3 次提交
  7. 20 2月, 2017 2 次提交
  8. 13 1月, 2017 1 次提交
  9. 15 12月, 2016 1 次提交
  10. 13 12月, 2016 2 次提交
  11. 11 12月, 2016 1 次提交
  12. 03 10月, 2016 2 次提交
  13. 28 7月, 2016 2 次提交
  14. 01 6月, 2016 2 次提交
  15. 26 5月, 2016 14 次提交
  16. 02 5月, 2016 1 次提交
  17. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf