Files
ubports_kernel_google_msm/include/linux
David Howells a17754fb8c CacheFiles: Don't write a full page if there's only a partial page to cache
cachefiles_write_page() writes a full page to the backing file for the last
page of the netfs file, even if the netfs file's last page is only a partial
page.

This causes the EOF on the backing file to be extended beyond the EOF of the
netfs, and thus the backing file will be truncated by cachefiles_attr_changed()
called from cachefiles_lookup_object().

So we need to limit the write we make to the backing file on that last page
such that it doesn't push the EOF too far.

Also, if a backing file that has a partial page at the end is expanded, we
discard the partial page and refetch it on the basis that we then have a hole
in the file with invalid data, and should the power go out...  A better way to
deal with this could be to record a note that the partial page contains invalid
data until the correct data is written into it.

This isn't a problem for netfs's that discard the whole backing file if the
file size changes (such as NFS).

Signed-off-by: David Howells <dhowells@redhat.com>
2009-11-19 18:11:52 +00:00
..
2009-09-23 07:39:29 -07:00
2009-09-19 02:14:45 -04:00
2009-09-20 16:09:20 +05:30
2009-09-23 11:01:25 -07:00
2009-09-18 09:48:52 -07:00
2009-09-14 17:41:42 -07:00
2009-09-12 14:48:40 +02:00
2009-09-11 12:54:58 -07:00
2009-09-23 07:39:41 -07:00
2009-09-26 10:17:19 -07:00
2009-09-30 00:32:06 -04:00
2009-09-23 07:39:58 -07:00
2009-09-19 13:13:17 -07:00
2009-09-26 10:17:19 -07:00
2009-09-22 07:17:33 -07:00
2009-09-18 21:22:08 +02:00
2009-10-06 00:26:27 -04:00
2009-09-23 07:39:41 -07:00
2009-09-22 07:17:35 -07:00
2009-09-21 15:14:51 +02:00
2009-09-26 10:17:19 -07:00
2009-09-22 07:17:47 -07:00
2009-10-04 15:05:10 -07:00
2009-09-23 07:39:41 -07:00
2009-10-30 12:25:12 -07:00
2009-10-29 07:39:25 -07:00
2009-09-23 06:46:23 -07:00
2009-09-23 18:13:10 -07:00
2009-09-23 22:26:32 +09:30
2009-09-22 07:17:30 -07:00
2009-09-19 13:13:25 -07:00
2009-09-19 13:13:26 -07:00
2009-09-15 16:51:30 +02:00