1. 01 6月, 2016 4 次提交
    • Y
      ceph: improve fscache revalidation · f7f7e7a0
      Yan, Zheng 提交于
      There are several issues in fscache revalidation code.
      - In ceph_revalidate_work(), fscache_invalidate() is called when
        fscache_check_consistency() return 0. This is complete wrong
        because 0 means cache is valid.
      - Handle_cap_grant() calls ceph_queue_revalidate() if client
        already has CAP_FILE_CACHE. This code is confusing. Client
        should revalidate the cache each time it got CAP_FILE_CACHE
        anew.
      - In Handle_cap_grant(), fscache_invalidate() is called if MDS
        revokes CAP_FILE_CACHE. This is inconsistency with the case
        that inode get evicted. In the later case, the cache is not
        discarded. Client may use the cache when inode is reloaded.
      
      This patch moves the fscache revalidation into ceph_get_caps().
      Client revalidates the cache after it gets CAP_FILE_CACHE.
      i_rdcache_gen should keep constance while CAP_FILE_CACHE is
      used. If i_fscache_gen is not equal to i_rdcache_gen, client
      needs to check cache's consistency.
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      f7f7e7a0
    • Y
      ceph: disable fscache when inode is opened for write · 46b59b2b
      Yan, Zheng 提交于
      All other filesystems do not add dirty pages to fscache. They all
      disable fscache when inode is opened for write. Only ceph adds
      dirty pages to fscache, but the code is buggy.
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      46b59b2b
    • Y
      ceph: avoid unnecessary fscache invalidation/revlidation · 14649758
      Yan, Zheng 提交于
      ceph_fill_file_size() has already called ceph_fscache_invalidate()
      if it return true.
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      14649758
    • Y
      ceph: call __fscache_uncache_page() if readpages fails · 368e3585
      Yan, Zheng 提交于
      If readpages fails, fscache needs to cleanup its internal state.
      Signed-off-by: NYan, Zheng <zyan@redhat.com>
      368e3585
  2. 31 5月, 2016 1 次提交
  3. 28 5月, 2016 1 次提交
  4. 26 5月, 2016 34 次提交