<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/ceph/cache.h, branch v4.13</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ceph: improve fscache revalidation</title>
<updated>2016-06-01T08:31:50+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zyan@redhat.com</email>
</author>
<published>2016-05-18T12:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f7f7e7a0635dedd5064fba255cb3facfa87b06d6'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: disable fscache when inode is opened for write</title>
<updated>2016-06-01T08:31:07+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zyan@redhat.com</email>
</author>
<published>2016-05-18T07:25:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=46b59b2be05a71d80d76883d2f495f182d768f47'/>
<id>46b59b2be05a71d80d76883d2f495f182d768f47</id>
<content type='text'>
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: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: Yan, Zheng &lt;zyan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: fscache: add an interface to synchronize object store limit</title>
<updated>2014-04-03T02:33:53+00:00</updated>
<author>
<name>Yunchuan Wen</name>
<email>yunchuanwen@ubuntukylin.com</email>
</author>
<published>2013-12-26T14:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=020c4bddc030815a767d86ba36ee0563e9855c23'/>
<id>020c4bddc030815a767d86ba36ee0563e9855c23</id>
<content type='text'>
Add an interface to explicitly synchronize object-&gt;store_limit[_l]
with inode-&gt;i_size

Tested-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: Yunchuan Wen &lt;yunchuanwen@ubuntukylin.com&gt;
Signed-off-by: Min Chen &lt;minchen@ubuntukylin.com&gt;
Signed-off-by: Li Wang &lt;liwang@ubuntukylin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an interface to explicitly synchronize object-&gt;store_limit[_l]
with inode-&gt;i_size

Tested-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: Yunchuan Wen &lt;yunchuanwen@ubuntukylin.com&gt;
Signed-off-by: Min Chen &lt;minchen@ubuntukylin.com&gt;
Signed-off-by: Li Wang &lt;liwang@ubuntukylin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph fscache: Introduce a routine for uncaching single no data page from fscache</title>
<updated>2013-12-31T18:32:02+00:00</updated>
<author>
<name>Li Wang</name>
<email>liwang@ubuntukylin.com</email>
</author>
<published>2013-12-19T14:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3f42bc4beadef554fd0d4e6408e9142da268613b'/>
<id>3f42bc4beadef554fd0d4e6408e9142da268613b</id>
<content type='text'>
Signed-off-by: Li Wang &lt;liwang@ubuntukylin.com&gt;
Reviewed-by: Milosz Tanski &lt;milosz@adfin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Li Wang &lt;liwang@ubuntukylin.com&gt;
Reviewed-by: Milosz Tanski &lt;milosz@adfin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: trivial buildbot warnings fix</title>
<updated>2013-09-06T16:50:12+00:00</updated>
<author>
<name>Milosz Tanski</name>
<email>milosz@adfin.com</email>
</author>
<published>2013-09-06T15:13:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=971f0bdeaabac4fcc335dace2f98e79157db4302'/>
<id>971f0bdeaabac4fcc335dace2f98e79157db4302</id>
<content type='text'>
The linux-next build bot found a three of warnings, this addresses all of them.

 * non-ANSI function declaration of function 'ceph_fscache_register' and
   'ceph_fscache_unregister'
 * symbol 'ceph_cache_netfs' was not declared, now it's extern in the header.
 * warning: "pr_fmt" redefined

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The linux-next build bot found a three of warnings, this addresses all of them.

 * non-ANSI function declaration of function 'ceph_fscache_register' and
   'ceph_fscache_unregister'
 * symbol 'ceph_cache_netfs' was not declared, now it's extern in the header.
 * warning: "pr_fmt" redefined

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: page still marked private_2</title>
<updated>2013-09-06T16:50:12+00:00</updated>
<author>
<name>Milosz Tanski</name>
<email>milosz@adfin.com</email>
</author>
<published>2013-09-03T23:11:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d4d3aa38d66d0313401534bff2e4647df0a6d538'/>
<id>d4d3aa38d66d0313401534bff2e4647df0a6d538</id>
<content type='text'>
Previous patch that allowed us to cleanup most of the issues with pages marked
as private_2 when calling ceph_readpages. However, there seams to be a case in
the error case clean up in start read that still trigers this from time to
time. I've only seen this one a couple times.

BUG: Bad page state in process petabucket  pfn:335b82
page:ffffea000cd6e080 count:0 mapcount:0 mapping:          (null) index:0x0
page flags: 0x200000000001000(private_2)
Call Trace:
 [&lt;ffffffff81563442&gt;] dump_stack+0x46/0x58
 [&lt;ffffffff8112c7f7&gt;] bad_page+0xc7/0x120
 [&lt;ffffffff8112cd9e&gt;] free_pages_prepare+0x10e/0x120
 [&lt;ffffffff8112e580&gt;] free_hot_cold_page+0x40/0x160
 [&lt;ffffffff81132427&gt;] __put_single_page+0x27/0x30
 [&lt;ffffffff81132d95&gt;] put_page+0x25/0x40
 [&lt;ffffffffa02cb409&gt;] ceph_readpages+0x2e9/0x6f0 [ceph]
 [&lt;ffffffff811313cf&gt;] __do_page_cache_readahead+0x1af/0x260

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous patch that allowed us to cleanup most of the issues with pages marked
as private_2 when calling ceph_readpages. However, there seams to be a case in
the error case clean up in start read that still trigers this from time to
time. I've only seen this one a couple times.

BUG: Bad page state in process petabucket  pfn:335b82
page:ffffea000cd6e080 count:0 mapcount:0 mapping:          (null) index:0x0
page flags: 0x200000000001000(private_2)
Call Trace:
 [&lt;ffffffff81563442&gt;] dump_stack+0x46/0x58
 [&lt;ffffffff8112c7f7&gt;] bad_page+0xc7/0x120
 [&lt;ffffffff8112cd9e&gt;] free_pages_prepare+0x10e/0x120
 [&lt;ffffffff8112e580&gt;] free_hot_cold_page+0x40/0x160
 [&lt;ffffffff81132427&gt;] __put_single_page+0x27/0x30
 [&lt;ffffffff81132d95&gt;] put_page+0x25/0x40
 [&lt;ffffffffa02cb409&gt;] ceph_readpages+0x2e9/0x6f0 [ceph]
 [&lt;ffffffff811313cf&gt;] __do_page_cache_readahead+0x1af/0x260

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: clean PgPrivate2 on returning from readpages</title>
<updated>2013-09-06T16:50:11+00:00</updated>
<author>
<name>Milosz Tanski</name>
<email>milosz@adfin.com</email>
</author>
<published>2013-08-21T21:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=76be778b3a4eae63ee4dcb22ff2045d3a0fe863b'/>
<id>76be778b3a4eae63ee4dcb22ff2045d3a0fe863b</id>
<content type='text'>
In some cases the ceph readapages code code bails without filling all the pages
already marked by fscache. When we return back to readahead code this causes
a BUG.

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases the ceph readapages code code bails without filling all the pages
already marked by fscache. When we return back to readahead code this causes
a BUG.

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: use fscache as a local presisent cache</title>
<updated>2013-09-06T16:50:11+00:00</updated>
<author>
<name>Milosz Tanski</name>
<email>milosz@adfin.com</email>
</author>
<published>2013-08-21T21:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=99ccbd229cf7453206bc858e795ec1f0345ff258'/>
<id>99ccbd229cf7453206bc858e795ec1f0345ff258</id>
<content type='text'>
Adding support for fscache to the Ceph filesystem. This would bring it to on
par with some of the other network filesystems in Linux (like NFS, AFS, etc...)

In order to mount the filesystem with fscache the 'fsc' mount option must be
passed.

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding support for fscache to the Ceph filesystem. This would bring it to on
par with some of the other network filesystems in Linux (like NFS, AFS, etc...)

In order to mount the filesystem with fscache the 'fsc' mount option must be
passed.

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
