<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ceph/caps.c, branch linux-4.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-06-01T08:31:50Z</updated>
<entry>
<title>ceph: improve fscache revalidation</title>
<updated>2016-06-01T08:31:50Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-05-18T12:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7f7e7a0635dedd5064fba255cb3facfa87b06d6'/>
<id>urn:sha1:f7f7e7a0635dedd5064fba255cb3facfa87b06d6</id>
<content type='text'>
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: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: avoid unnecessary fscache invalidation/revlidation</title>
<updated>2016-06-01T08:30:41Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-05-20T07:41:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1464975816c79a7cd28dc314384f060a122a9d55'/>
<id>urn:sha1:1464975816c79a7cd28dc314384f060a122a9d55</id>
<content type='text'>
ceph_fill_file_size() has already called ceph_fscache_invalidate()
if it return true.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: don't use truncate_pagecache() to invalidate read cache</title>
<updated>2016-05-25T23:15:42Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-05-18T12:58:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9abd4db713704aac146395e079224ddd716e9b95'/>
<id>urn:sha1:9abd4db713704aac146395e079224ddd716e9b95</id>
<content type='text'>
truncate_pagecache() drops dirty pages, it's dangerous to use it
to invalidate read cache. Besides, we shouldn't start invalidating
read cache while there are buffer writers. Because buffer writers
may add dirty pages later.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: renew caps for read/write if mds session got killed.</title>
<updated>2016-05-25T23:15:31Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-04-08T07:27:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77310320c299b0dc050037ff8fc29fd1861fb005'/>
<id>urn:sha1:77310320c299b0dc050037ff8fc29fd1861fb005</id>
<content type='text'>
When mds session gets killed, read/write operation may hang.
Client waits for Frw caps, but mds does not know what caps client
wants. To recover this, client sends an open request to mds. The
request will tell mds what caps client wants.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros</title>
<updated>2016-04-04T17:41:08Z</updated>
<author>
<name>Kirill A. Shutemov</name>
</author>
<published>2016-04-01T12:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a'/>
<id>urn:sha1:09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a</id>
<content type='text'>
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:

 - &lt;foo&gt; &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - &lt;foo&gt; &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -&gt; PAGE_{SIZE,SHIFT,MASK,ALIGN};

 - page_cache_get() -&gt; get_page();

 - page_cache_release() -&gt; 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 &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
expression E;
@@
- E &gt;&gt; (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: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ceph: encode ctime in cap message</title>
<updated>2016-03-25T17:51:40Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-01-22T10:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1eee0c0e13a1eccde3418a12babf9d77860eee9'/>
<id>urn:sha1:d1eee0c0e13a1eccde3418a12babf9d77860eee9</id>
<content type='text'>
Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: initial CEPH_FEATURE_FS_FILE_LAYOUT_V2 support</title>
<updated>2016-03-04T20:00:37Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-02-14T10:06:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ea5c5e0a7f70b256417d3b6e36bd9851504babd'/>
<id>urn:sha1:5ea5c5e0a7f70b256417d3b6e36bd9851504babd</id>
<content type='text'>
Add support for the format change of MClientReply/MclientCaps.
Also add code that denies access to inodes with pool_ns layouts.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
Reviewed-by: Sage Weil &lt;sage@redhat.com&gt;
</content>
</entry>
<entry>
<title>wrappers for -&gt;i_mutex access</title>
<updated>2016-01-22T23:04:28Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2016-01-22T20:40:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5955102c9984fa081b2d570cfac75c97eecf8f3b'/>
<id>urn:sha1:5955102c9984fa081b2d570cfac75c97eecf8f3b</id>
<content type='text'>
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
inode_foo(inode) being mutex_foo(&amp;inode-&gt;i_mutex).

Please, use those for access to -&gt;i_mutex; over the coming cycle
-&gt;i_mutex will become rwsem, with -&gt;lookup() done with it held
only shared.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ceph: make fsync() wait unsafe requests that created/modified inode</title>
<updated>2015-11-02T22:36:48Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2015-10-27T10:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68cd5b4b7612c2956d8553dfb39490b29f32566d'/>
<id>urn:sha1:68cd5b4b7612c2956d8553dfb39490b29f32566d</id>
<content type='text'>
If we get a unsafe reply for request that created/modified inode,
add the unsafe request to a list in the newly created/modified
inode. So we can make fsync() wait these unsafe requests.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: don't invalidate page cache when inode is no longer used</title>
<updated>2015-11-02T22:36:48Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2015-10-26T08:08:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e804ac4824302efc3038e086cb21f2e93ab8900'/>
<id>urn:sha1:5e804ac4824302efc3038e086cb21f2e93ab8900</id>
<content type='text'>
ceph_check_caps() invalidate page cache when inode is not used
by any open file. This behaviour is not friendly for workload
that repeatly read files.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
</feed>
