1. 17 7月, 2011 1 次提交
  2. 12 7月, 2011 1 次提交
  3. 10 7月, 2011 2 次提交
  4. 08 7月, 2011 2 次提交
    • J
    • D
      FS-Cache: Add a helper to bulk uncache pages on an inode · c902ce1b
      David Howells 提交于
      Add an FS-Cache helper to bulk uncache pages on an inode.  This will
      only work for the circumstance where the pages in the cache correspond
      1:1 with the pages attached to an inode's page cache.
      
      This is required for CIFS and NFS: When disabling inode cookie, we were
      returning the cookie and setting cifsi->fscache to NULL but failed to
      invalidate any previously mapped pages.  This resulted in "Bad page
      state" errors and manifested in other kind of errors when running
      fsstress.  Fix it by uncaching mapped pages when we disable the inode
      cookie.
      
      This patch should fix the following oops and "Bad page state" errors
      seen during fsstress testing.
      
        ------------[ cut here ]------------
        kernel BUG at fs/cachefiles/namei.c:201!
        invalid opcode: 0000 [#1] SMP
        Pid: 5, comm: kworker/u:0 Not tainted 2.6.38.7-30.fc15.x86_64 #1 Bochs Bochs
        RIP: 0010: cachefiles_walk_to_object+0x436/0x745 [cachefiles]
        RSP: 0018:ffff88002ce6dd00  EFLAGS: 00010282
        RAX: ffff88002ef165f0 RBX: ffff88001811f500 RCX: 0000000000000000
        RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000282
        RBP: ffff88002ce6dda0 R08: 0000000000000100 R09: ffffffff81b3a300
        R10: 0000ffff00066c0a R11: 0000000000000003 R12: ffff88002ae54840
        R13: ffff88002ae54840 R14: ffff880029c29c00 R15: ffff88001811f4b0
        FS:  00007f394dd32720(0000) GS:ffff88002ef00000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
        CR2: 00007fffcb62ddf8 CR3: 000000001825f000 CR4: 00000000000006e0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
        Process kworker/u:0 (pid: 5, threadinfo ffff88002ce6c000, task ffff88002ce55cc0)
        Stack:
         0000000000000246 ffff88002ce55cc0 ffff88002ce6dd58 ffff88001815dc00
         ffff8800185246c0 ffff88001811f618 ffff880029c29d18 ffff88001811f380
         ffff88002ce6dd50 ffffffff814757e4 ffff88002ce6dda0 ffffffff8106ac56
        Call Trace:
         cachefiles_lookup_object+0x78/0xd4 [cachefiles]
         fscache_lookup_object+0x131/0x16d [fscache]
         fscache_object_work_func+0x1bc/0x669 [fscache]
         process_one_work+0x186/0x298
         worker_thread+0xda/0x15d
         kthread+0x84/0x8c
         kernel_thread_helper+0x4/0x10
        RIP  cachefiles_walk_to_object+0x436/0x745 [cachefiles]
        ---[ end trace 1d481c9af1804caa ]---
      
      I tested the uncaching by the following means:
      
       (1) Create a big file on my NFS server (104857600 bytes).
      
       (2) Read the file into the cache with md5sum on the NFS client.  Look in
           /proc/fs/fscache/stats:
      
      	Pages  : mrk=25601 unc=0
      
       (3) Open the file for read/write ("bash 5<>/warthog/bigfile").  Look in proc
           again:
      
      	Pages  : mrk=25601 unc=25601
      Reported-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-and-Tested-by: NSuresh Jayaraman <sjayaraman@suse.de>
      cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c902ce1b
  5. 07 7月, 2011 3 次提交
  6. 02 7月, 2011 1 次提交
    • J
      cifs: set socket send and receive timeouts before attempting connect · ee1b3ea9
      Jeff Layton 提交于
      Benjamin S. reported that he was unable to suspend his machine while
      it had a cifs share mounted. The freezer caused this to spew when he
      tried it:
      
      -----------------------[snip]------------------
      PM: Syncing filesystems ... done.
      Freezing user space processes ... (elapsed 0.01 seconds) done.
      Freezing remaining freezable tasks ...
      Freezing of tasks failed after 20.01 seconds (1 tasks refusing to freeze, wq_busy=0):
      cifsd         S ffff880127f7b1b0     0  1821      2 0x00800000
       ffff880127f7b1b0 0000000000000046 ffff88005fe008a8 ffff8800ffffffff
       ffff880127cee6b0 0000000000011100 ffff880127737fd8 0000000000004000
       ffff880127737fd8 0000000000011100 ffff880127f7b1b0 ffff880127736010
      Call Trace:
       [<ffffffff811e85dd>] ? sk_reset_timer+0xf/0x19
       [<ffffffff8122cf3f>] ? tcp_connect+0x43c/0x445
       [<ffffffff8123374e>] ? tcp_v4_connect+0x40d/0x47f
       [<ffffffff8126ce41>] ? schedule_timeout+0x21/0x1ad
       [<ffffffff8126e358>] ? _raw_spin_lock_bh+0x9/0x1f
       [<ffffffff811e81c7>] ? release_sock+0x19/0xef
       [<ffffffff8123e8be>] ? inet_stream_connect+0x14c/0x24a
       [<ffffffff8104485b>] ? autoremove_wake_function+0x0/0x2a
       [<ffffffffa02ccfe2>] ? ipv4_connect+0x39c/0x3b5 [cifs]
       [<ffffffffa02cd7b7>] ? cifs_reconnect+0x1fc/0x28a [cifs]
       [<ffffffffa02cdbdc>] ? cifs_demultiplex_thread+0x397/0xb9f [cifs]
       [<ffffffff81076afc>] ? perf_event_exit_task+0xb9/0x1bf
       [<ffffffffa02cd845>] ? cifs_demultiplex_thread+0x0/0xb9f [cifs]
       [<ffffffffa02cd845>] ? cifs_demultiplex_thread+0x0/0xb9f [cifs]
       [<ffffffff810444a1>] ? kthread+0x7a/0x82
       [<ffffffff81002d14>] ? kernel_thread_helper+0x4/0x10
       [<ffffffff81044427>] ? kthread+0x0/0x82
       [<ffffffff81002d10>] ? kernel_thread_helper+0x0/0x10
      
      Restarting tasks ... done.
      -----------------------[snip]------------------
      
      We do attempt to perform a try_to_freeze in cifs_reconnect, but the
      connection attempt itself seems to be taking longer than 20s to time
      out. The connect timeout is governed by the socket send and receive
      timeouts, so we can shorten that period by setting those timeouts
      before attempting the connect instead of after.
      
      Adam Williamson tested the patch and said that it seems to have fixed
      suspending on his laptop when a cifs share is mounted.
      Reported-by: NBenjamin S <da_joind@gmx.net>
      Tested-by: NAdam Williamson <awilliam@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ee1b3ea9
  7. 25 6月, 2011 17 次提交
  8. 24 6月, 2011 1 次提交
  9. 23 6月, 2011 1 次提交
  10. 20 6月, 2011 1 次提交
  11. 15 6月, 2011 1 次提交
  12. 14 6月, 2011 5 次提交
  13. 09 6月, 2011 1 次提交
  14. 07 6月, 2011 2 次提交
  15. 06 6月, 2011 1 次提交