<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/fs/ceph/cache.c, branch v5.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-03-30T10:42:40Z</updated>
<entry>
<title>ceph: replace zero-length array with flexible-array member</title>
<updated>2020-03-30T10:42:40Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-13T16:00:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f682dc713c0af79effde49209f3895072579791b'/>
<id>urn:sha1:f682dc713c0af79effde49209f3895072579791b</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>ceph: use errorfc() and friends instead of spelling the prefix out</title>
<updated>2020-02-07T19:48:39Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2019-12-22T02:31:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d53d0f7461a52b08b0146156d79c64c0842fd38d'/>
<id>urn:sha1:d53d0f7461a52b08b0146156d79c64c0842fd38d</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>libceph, rbd, ceph: convert to use the new mount API</title>
<updated>2019-11-27T21:28:37Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2019-03-25T16:38:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=82995cc6c5ae4bf4d72edef381a085e52d5b5905'/>
<id>urn:sha1:82995cc6c5ae4bf4d72edef381a085e52d5b5905</id>
<content type='text'>
Convert the ceph filesystem to the new internal mount API as the old
one will be obsoleted and removed.  This allows greater flexibility in
communication of mount parameters between userspace, the VFS and the
filesystem.

See Documentation/filesystems/mount_api.txt for more information.

[ Numerous string handling, leak and regression fixes; rbd conversion
  was particularly broken and had to be redone almost from scratch. ]

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>ceph: include ceph_debug.h in cache.c</title>
<updated>2019-09-16T10:06:25Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2019-09-05T15:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=48f930ea6de6f48fd20be54ec4716c545751a6d9'/>
<id>urn:sha1:48f930ea6de6f48fd20be54ec4716c545751a6d9</id>
<content type='text'>
Any file that uses dout() should include ceph_debug.h at the top.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188</title>
<updated>2019-05-30T18:29:21Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-28T16:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1f327613224e3a811d01d66d3c38762b3822057c'/>
<id>urn:sha1:1f327613224e3a811d01d66d3c38762b3822057c</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not write to free software
  foundation 51 franklin street fifth floor boston ma 02111 1301 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 27 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Steve Winslow &lt;swinslow@gmail.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170026.981318839@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ceph: use timespec64 for inode timestamp</title>
<updated>2018-08-02T19:26:12Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-07-13T20:18:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9bbeab41ce50542624ef381e7852d70f2f39a2b1'/>
<id>urn:sha1:9bbeab41ce50542624ef381e7852d70f2f39a2b1</id>
<content type='text'>
Since the vfs structures are all using timespec64, we can now
change the internal representation, using ceph_encode_timespec64 and
ceph_decode_timespec64.

In case of ceph_aux_inode however, we need to avoid doing a memcmp()
on uninitialized padding data, so the members of the i_mtime field get
copied individually into 64-bit integers.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: "Yan, Zheng" &lt;zyan@redhat.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>vfs: change inode times to use struct timespec64</title>
<updated>2018-06-05T23:57:31Z</updated>
<author>
<name>Deepa Dinamani</name>
<email>deepa.kernel@gmail.com</email>
</author>
<published>2018-05-09T02:36:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=95582b00838837fc07e042979320caf917ce3fe6'/>
<id>urn:sha1:95582b00838837fc07e042979320caf917ce3fe6</id>
<content type='text'>
struct timespec is not y2038 safe. Transition vfs to use
y2038 safe struct timespec64 instead.

The change was made with the help of the following cocinelle
script. This catches about 80% of the changes.
All the header file and logic changes are included in the
first 5 rules. The rest are trivial substitutions.
I avoid changing any of the function signatures or any other
filesystem specific data structures to keep the patch simple
for review.

The script can be a little shorter by combining different cases.
But, this version was sufficient for my usecase.

virtual patch

@ depends on patch @
identifier now;
@@
- struct timespec
+ struct timespec64
  current_time ( ... )
  {
- struct timespec now = current_kernel_time();
+ struct timespec64 now = current_kernel_time64();
  ...
- return timespec_trunc(
+ return timespec64_trunc(
  ... );
  }

@ depends on patch @
identifier xtime;
@@
 struct \( iattr \| inode \| kstat \) {
 ...
-       struct timespec xtime;
+       struct timespec64 xtime;
 ...
 }

@ depends on patch @
identifier t;
@@
 struct inode_operations {
 ...
int (*update_time) (...,
-       struct timespec t,
+       struct timespec64 t,
...);
 ...
 }

@ depends on patch @
identifier t;
identifier fn_update_time =~ "update_time$";
@@
 fn_update_time (...,
- struct timespec *t,
+ struct timespec64 *t,
 ...) { ... }

@ depends on patch @
identifier t;
@@
lease_get_mtime( ... ,
- struct timespec *t
+ struct timespec64 *t
  ) { ... }

@te depends on patch forall@
identifier ts;
local idexpression struct inode *inode_node;
identifier i_xtime =~ "^i_[acm]time$";
identifier ia_xtime =~ "^ia_[acm]time$";
identifier fn_update_time =~ "update_time$";
identifier fn;
expression e, E3;
local idexpression struct inode *node1;
local idexpression struct inode *node2;
local idexpression struct iattr *attr1;
local idexpression struct iattr *attr2;
local idexpression struct iattr attr;
identifier i_xtime1 =~ "^i_[acm]time$";
identifier i_xtime2 =~ "^i_[acm]time$";
identifier ia_xtime1 =~ "^ia_[acm]time$";
identifier ia_xtime2 =~ "^ia_[acm]time$";
@@
(
(
- struct timespec ts;
+ struct timespec64 ts;
|
- struct timespec ts = current_time(inode_node);
+ struct timespec64 ts = current_time(inode_node);
)

&lt;+... when != ts
(
- timespec_equal(&amp;inode_node-&gt;i_xtime, &amp;ts)
+ timespec64_equal(&amp;inode_node-&gt;i_xtime, &amp;ts)
|
- timespec_equal(&amp;ts, &amp;inode_node-&gt;i_xtime)
+ timespec64_equal(&amp;ts, &amp;inode_node-&gt;i_xtime)
|
- timespec_compare(&amp;inode_node-&gt;i_xtime, &amp;ts)
+ timespec64_compare(&amp;inode_node-&gt;i_xtime, &amp;ts)
|
- timespec_compare(&amp;ts, &amp;inode_node-&gt;i_xtime)
+ timespec64_compare(&amp;ts, &amp;inode_node-&gt;i_xtime)
|
ts = current_time(e)
|
fn_update_time(..., &amp;ts,...)
|
inode_node-&gt;i_xtime = ts
|
node1-&gt;i_xtime = ts
|
ts = inode_node-&gt;i_xtime
|
&lt;+... attr1-&gt;ia_xtime ...+&gt; = ts
|
ts = attr1-&gt;ia_xtime
|
ts.tv_sec
|
ts.tv_nsec
|
btrfs_set_stack_timespec_sec(..., ts.tv_sec)
|
btrfs_set_stack_timespec_nsec(..., ts.tv_nsec)
|
- ts = timespec64_to_timespec(
+ ts =
...
-)
|
- ts = ktime_to_timespec(
+ ts = ktime_to_timespec64(
...)
|
- ts = E3
+ ts = timespec_to_timespec64(E3)
|
- ktime_get_real_ts(&amp;ts)
+ ktime_get_real_ts64(&amp;ts)
|
fn(...,
- ts
+ timespec64_to_timespec(ts)
,...)
)
...+&gt;
(
&lt;... when != ts
- return ts;
+ return timespec64_to_timespec(ts);
...&gt;
)
|
- timespec_equal(&amp;node1-&gt;i_xtime1, &amp;node2-&gt;i_xtime2)
+ timespec64_equal(&amp;node1-&gt;i_xtime2, &amp;node2-&gt;i_xtime2)
|
- timespec_equal(&amp;node1-&gt;i_xtime1, &amp;attr2-&gt;ia_xtime2)
+ timespec64_equal(&amp;node1-&gt;i_xtime2, &amp;attr2-&gt;ia_xtime2)
|
- timespec_compare(&amp;node1-&gt;i_xtime1, &amp;node2-&gt;i_xtime2)
+ timespec64_compare(&amp;node1-&gt;i_xtime1, &amp;node2-&gt;i_xtime2)
|
node1-&gt;i_xtime1 =
- timespec_trunc(attr1-&gt;ia_xtime1,
+ timespec64_trunc(attr1-&gt;ia_xtime1,
...)
|
- attr1-&gt;ia_xtime1 = timespec_trunc(attr2-&gt;ia_xtime2,
+ attr1-&gt;ia_xtime1 =  timespec64_trunc(attr2-&gt;ia_xtime2,
...)
|
- ktime_get_real_ts(&amp;attr1-&gt;ia_xtime1)
+ ktime_get_real_ts64(&amp;attr1-&gt;ia_xtime1)
|
- ktime_get_real_ts(&amp;attr.ia_xtime1)
+ ktime_get_real_ts64(&amp;attr.ia_xtime1)
)

@ depends on patch @
struct inode *node;
struct iattr *attr;
identifier fn;
identifier i_xtime =~ "^i_[acm]time$";
identifier ia_xtime =~ "^ia_[acm]time$";
expression e;
@@
(
- fn(node-&gt;i_xtime);
+ fn(timespec64_to_timespec(node-&gt;i_xtime));
|
 fn(...,
- node-&gt;i_xtime);
+ timespec64_to_timespec(node-&gt;i_xtime));
|
- e = fn(attr-&gt;ia_xtime);
+ e = fn(timespec64_to_timespec(attr-&gt;ia_xtime));
)

@ depends on patch forall @
struct inode *node;
struct iattr *attr;
identifier i_xtime =~ "^i_[acm]time$";
identifier ia_xtime =~ "^ia_[acm]time$";
identifier fn;
@@
{
+ struct timespec ts;
&lt;+...
(
+ ts = timespec64_to_timespec(node-&gt;i_xtime);
fn (...,
- &amp;node-&gt;i_xtime,
+ &amp;ts,
...);
|
+ ts = timespec64_to_timespec(attr-&gt;ia_xtime);
fn (...,
- &amp;attr-&gt;ia_xtime,
+ &amp;ts,
...);
)
...+&gt;
}

@ depends on patch forall @
struct inode *node;
struct iattr *attr;
struct kstat *stat;
identifier ia_xtime =~ "^ia_[acm]time$";
identifier i_xtime =~ "^i_[acm]time$";
identifier xtime =~ "^[acm]time$";
identifier fn, ret;
@@
{
+ struct timespec ts;
&lt;+...
(
+ ts = timespec64_to_timespec(node-&gt;i_xtime);
ret = fn (...,
- &amp;node-&gt;i_xtime,
+ &amp;ts,
...);
|
+ ts = timespec64_to_timespec(node-&gt;i_xtime);
ret = fn (...,
- &amp;node-&gt;i_xtime);
+ &amp;ts);
|
+ ts = timespec64_to_timespec(attr-&gt;ia_xtime);
ret = fn (...,
- &amp;attr-&gt;ia_xtime,
+ &amp;ts,
...);
|
+ ts = timespec64_to_timespec(attr-&gt;ia_xtime);
ret = fn (...,
- &amp;attr-&gt;ia_xtime);
+ &amp;ts);
|
+ ts = timespec64_to_timespec(stat-&gt;xtime);
ret = fn (...,
- &amp;stat-&gt;xtime);
+ &amp;ts);
)
...+&gt;
}

@ depends on patch @
struct inode *node;
struct inode *node2;
identifier i_xtime1 =~ "^i_[acm]time$";
identifier i_xtime2 =~ "^i_[acm]time$";
identifier i_xtime3 =~ "^i_[acm]time$";
struct iattr *attrp;
struct iattr *attrp2;
struct iattr attr ;
identifier ia_xtime1 =~ "^ia_[acm]time$";
identifier ia_xtime2 =~ "^ia_[acm]time$";
struct kstat *stat;
struct kstat stat1;
struct timespec64 ts;
identifier xtime =~ "^[acmb]time$";
expression e;
@@
(
( node-&gt;i_xtime2 \| attrp-&gt;ia_xtime2 \| attr.ia_xtime2 \) = node-&gt;i_xtime1  ;
|
 node-&gt;i_xtime2 = \( node2-&gt;i_xtime1 \| timespec64_trunc(...) \);
|
 node-&gt;i_xtime2 = node-&gt;i_xtime1 = node-&gt;i_xtime3 = \(ts \| current_time(...) \);
|
 node-&gt;i_xtime1 = node-&gt;i_xtime3 = \(ts \| current_time(...) \);
|
 stat-&gt;xtime = node2-&gt;i_xtime1;
|
 stat1.xtime = node2-&gt;i_xtime1;
|
( node-&gt;i_xtime2 \| attrp-&gt;ia_xtime2 \) = attrp-&gt;ia_xtime1  ;
|
( attrp-&gt;ia_xtime1 \| attr.ia_xtime1 \) = attrp2-&gt;ia_xtime2;
|
- e = node-&gt;i_xtime1;
+ e = timespec64_to_timespec( node-&gt;i_xtime1 );
|
- e = attrp-&gt;ia_xtime1;
+ e = timespec64_to_timespec( attrp-&gt;ia_xtime1 );
|
node-&gt;i_xtime1 = current_time(...);
|
 node-&gt;i_xtime2 = node-&gt;i_xtime1 = node-&gt;i_xtime3 =
- e;
+ timespec_to_timespec64(e);
|
 node-&gt;i_xtime1 = node-&gt;i_xtime3 =
- e;
+ timespec_to_timespec64(e);
|
- node-&gt;i_xtime1 = e;
+ node-&gt;i_xtime1 = timespec_to_timespec64(e);
)

Signed-off-by: Deepa Dinamani &lt;deepa.kernel@gmail.com&gt;
Cc: &lt;anton@tuxera.com&gt;
Cc: &lt;balbi@kernel.org&gt;
Cc: &lt;bfields@fieldses.org&gt;
Cc: &lt;darrick.wong@oracle.com&gt;
Cc: &lt;dhowells@redhat.com&gt;
Cc: &lt;dsterba@suse.com&gt;
Cc: &lt;dwmw2@infradead.org&gt;
Cc: &lt;hch@lst.de&gt;
Cc: &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: &lt;hubcap@omnibond.com&gt;
Cc: &lt;jack@suse.com&gt;
Cc: &lt;jaegeuk@kernel.org&gt;
Cc: &lt;jaharkes@cs.cmu.edu&gt;
Cc: &lt;jslaby@suse.com&gt;
Cc: &lt;keescook@chromium.org&gt;
Cc: &lt;mark@fasheh.com&gt;
Cc: &lt;miklos@szeredi.hu&gt;
Cc: &lt;nico@linaro.org&gt;
Cc: &lt;reiserfs-devel@vger.kernel.org&gt;
Cc: &lt;richard@nod.at&gt;
Cc: &lt;sage@redhat.com&gt;
Cc: &lt;sfrench@samba.org&gt;
Cc: &lt;swhiteho@redhat.com&gt;
Cc: &lt;tj@kernel.org&gt;
Cc: &lt;trond.myklebust@primarydata.com&gt;
Cc: &lt;tytso@mit.edu&gt;
Cc: &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'ceph-for-4.17-rc1' of git://github.com/ceph/ceph-client</title>
<updated>2018-04-10T19:25:30Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-04-10T19:25:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b284d4d5a6785f8cd07eda2646a95782373cd01e'/>
<id>urn:sha1:b284d4d5a6785f8cd07eda2646a95782373cd01e</id>
<content type='text'>
Pull ceph updates from Ilya Dryomov:
 "The big ticket items are:

   - support for rbd "fancy" striping (myself).

     The striping feature bit is now fully implemented, allowing mapping
     v2 images with non-default striping patterns. This completes
     support for --image-format 2.

   - CephFS quota support (Luis Henriques and Zheng Yan).

     This set is based on the new SnapRealm code in the upcoming v13.y.z
     ("Mimic") release. Quota handling will be rejected on older
     filesystems.

   - memory usage improvements in CephFS (Chengguang Xu).

     Directory specific bits have been split out of ceph_file_info and
     some effort went into improving cap reservation code to avoid OOM
     crashes.

  Also included a bunch of assorted fixes all over the place from
  Chengguang and others"

* tag 'ceph-for-4.17-rc1' of git://github.com/ceph/ceph-client: (67 commits)
  ceph: quota: report root dir quota usage in statfs
  ceph: quota: add counter for snaprealms with quota
  ceph: quota: cache inode pointer in ceph_snap_realm
  ceph: fix root quota realm check
  ceph: don't check quota for snap inode
  ceph: quota: update MDS when max_bytes is approaching
  ceph: quota: support for ceph.quota.max_bytes
  ceph: quota: don't allow cross-quota renames
  ceph: quota: support for ceph.quota.max_files
  ceph: quota: add initial infrastructure to support cephfs quotas
  rbd: remove VLA usage
  rbd: fix spelling mistake: "reregisteration" -&gt; "reregistration"
  ceph: rename function drop_leases() to a more descriptive name
  ceph: fix invalid point dereference for error case in mdsc destroy
  ceph: return proper bool type to caller instead of pointer
  ceph: optimize memory usage
  ceph: optimize mds session register
  libceph, ceph: add __init attribution to init funcitons
  ceph: filter out used flags when printing unused open flags
  ceph: don't wait on writeback when there is no more dirty pages
  ...
</content>
</entry>
<entry>
<title>fscache: Pass object size in rather than calling back for it</title>
<updated>2018-04-06T13:05:14Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2018-04-04T12:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ee1235a9a06813429c201bf186397a6feeea07bf'/>
<id>urn:sha1:ee1235a9a06813429c201bf186397a6feeea07bf</id>
<content type='text'>
Pass the object size in to fscache_acquire_cookie() and
fscache_write_page() rather than the netfs providing a callback by which it
can be received.  This makes it easier to update the size of the object
when a new page is written that extends the object.

The current object size is also passed by fscache to the check_aux
function, obviating the need to store it in the aux data.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Anna Schumaker &lt;anna.schumaker@netapp.com&gt;
Tested-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
</entry>
<entry>
<title>fscache: Attach the index key and aux data to the cookie</title>
<updated>2018-04-04T12:41:28Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2018-04-04T12:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=402cb8dda949d9b8c0df20ad2527d139faad7ca1'/>
<id>urn:sha1:402cb8dda949d9b8c0df20ad2527d139faad7ca1</id>
<content type='text'>
Attach copies of the index key and auxiliary data to the fscache cookie so
that:

 (1) The callbacks to the netfs for this stuff can be eliminated.  This
     can simplify things in the cache as the information is still
     available, even after the cache has relinquished the cookie.

 (2) Simplifies the locking requirements of accessing the information as we
     don't have to worry about the netfs object going away on us.

 (3) The cache can do lazy updating of the coherency information on disk.
     As long as the cache is flushed before reboot/poweroff, there's no
     need to update the coherency info on disk every time it changes.

 (4) Cookies can be hashed or put in a tree as the index key is easily
     available.  This allows:

     (a) Checks for duplicate cookies can be made at the top fscache layer
     	 rather than down in the bowels of the cache backend.

     (b) Caching can be added to a netfs object that has a cookie if the
     	 cache is brought online after the netfs object is allocated.

A certain amount of space is made in the cookie for inline copies of the
data, but if it won't fit there, extra memory will be allocated for it.

The downside of this is that live cache operation requires more memory.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Anna Schumaker &lt;anna.schumaker@netapp.com&gt;
Tested-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
</entry>
</feed>
