Using Debian 2.6.30-rc8 packages on a 686. fsc is mounted & started, reading from those files the cache starts to be populated ok, but re-reading these files immediately creates the following stack trace: +++ Jun 6 18:59:58 syydelaervli kernel: [ 1107.260445] Pid: 2104, comm: kslowd Not tainted 2.6.30-rc8-686 #1 Jun 6 18:59:59 syydelaervli kernel: [ 1107.260535] Call Trace: Jun 6 18:59:59 syydelaervli kernel: [ 1107.260656] [<c917c6ee>] ? cachefiles_read_waiter+0x45/0xc0 [cachefiles] Jun 6 18:59:59 syydelaervli kernel: [ 1107.260762] [<c011bce5>] ? __wake_up_common+0x34/0x59 Jun 6 18:59:59 syydelaervli kernel: [ 1107.260849] [<c011c5af>] ? __wake_up+0x29/0x39 Jun 6 18:59:59 syydelaervli kernel: [ 1107.260941] [<c0136869>] ? __wake_up_bit+0x29/0x2e Jun 6 18:59:59 syydelaervli kernel: [ 1107.261151] [<c8abde27>] ? ext3_truncate+0x365/0x710 [ext3] Jun 6 18:59:59 syydelaervli kernel: [ 1107.261262] [<c017b13b>] ? vmtruncate+0xf6/0x119 Jun 6 18:59:59 syydelaervli kernel: [ 1107.261343] [<c019c011>] ? inode_setattr+0x4b/0x11b Jun 6 18:59:59 syydelaervli kernel: [ 1107.261496] [<c8abbccd>] ? ext3_setattr+0x156/0x1ab [ext3] Jun 6 18:59:59 syydelaervli kernel: [ 1107.261583] [<c019c233>] ? notify_change+0x152/0x28f Jun 6 18:59:59 syydelaervli kernel: [ 1107.261674] [<c01a8000>] ? block_read_full_page+0x233/0x270 Jun 6 18:59:59 syydelaervli kernel: [ 1107.261778] [<c917a2bc>] ? cachefiles_attr_changed+0xfb/0x156 [cachefiles] Jun 6 18:59:59 syydelaervli kernel: [ 1107.261933] [<c8ff6f6c>] ? fscache_lookup_object+0xe2/0xf4 [fscache] Jun 6 18:59:59 syydelaervli kernel: [ 1107.262052] [<c8ff7357>] ? fscache_object_slow_work_execute+0x187/0x567 [fscache] Jun 6 18:59:59 syydelaervli kernel: [ 1107.262160] [<c0169f55>] ? slow_work_thread+0x264/0x3f3 Jun 6 18:59:59 syydelaervli kernel: [ 1107.262248] [<c01368ca>] ? autoremove_wake_function+0x0/0x2d Jun 6 18:59:59 syydelaervli kernel: [ 1107.262331] [<c0169cf1>] ? slow_work_thread+0x0/0x3f3 Jun 6 18:59:59 syydelaervli kernel: [ 1107.262412] [<c01365dc>] ? kthread+0x42/0x67 Jun 6 18:59:59 syydelaervli kernel: [ 1107.262490] [<c013659a>] ? kthread+0x0/0x67 Jun 6 18:59:59 syydelaervli kernel: [ 1107.262584] [<c0103ab7>] ? kernel_thread_helper+0x7/0x10 Jun 6 18:59:59 syydelaervli kernel: [ 1107.262777] CacheFiles: I/O Error: Readpage failed on backing file 40000830 Jun 6 18:59:59 syydelaervli kernel: [ 1107.262862] FS-Cache: Cache cachefiles stopped due to I/O error +++ (this one if using nfs3, but nfs4 behaves the same.)
Reassigned to dhowells.
I've come across this one. I have a tentative patch to fix it that I've given to someone else to test.
Created attachment 21853 [details] Patch to stop cachefiles from writing to much data to the backing file Can you try this patch please? I think it should fix the problem, which is that cachefiles currently writes beyond the EOF when the netfs inode's last page is a partial page. This causes cachefiles to subsequently try to truncate the last page of the backing file to the expected file - which has consequences when we're also trying to read that page.
Ok, hasn't crashed for me so far after a few 100M of the same kind of traffic as I tried originally. (I've applied this on top of Debian's linux-source-2.6.30 package version 2.6.30-1~experimental.1~snapshot.13794.) Thanks a lot. cheers -- vbi