1. 25 Jan, 2008 2 commits
    • Steven Whitehouse's avatar
      [GFS2] Clean up internal read function · 51ff87bd
      Steven Whitehouse authored
      
      
      As requested by Christoph, this patch cleans up GFS2's internal
      read function so that it no longer uses the do_generic_mapping_read
      function. This function is obsolete and GFS2 is the last user of it.
      
      As a side effect the internal read code gets smaller and easier
      to read and gfs2_readpage is split into two. One function has the locking
      and the other function has the rest of the logic.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      51ff87bd
    • Wendy Cheng's avatar
      [GFS2] Handle multiple glock demote requests · cc7e79b1
      Wendy Cheng authored
      
      
      Fix a race condition where multiple glock demote requests are sent to
      a node back-to-back. This patch does a check inside handle_callback()
      to see whether a demote request is in progress. If true, it sets a flag
      to make sure run_queue() will loop again to handle the new request,
      instead of erronously setting gl_demote_state to a different state.
      Signed-off-by: default avatarS. Wendy Cheng <wcheng@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      cc7e79b1
  2. 22 Jan, 2008 2 commits
  3. 17 Jan, 2008 2 commits
  4. 16 Jan, 2008 2 commits
  5. 14 Jan, 2008 2 commits
  6. 13 Jan, 2008 2 commits
    • NeilBrown's avatar
      knfsd: Allow NFSv2/3 WRITE calls to succeed when krb5i etc is used. · ba67a39e
      NeilBrown authored
      When RPCSEC/GSS and krb5i is used, requests are padded, typically to a multiple
      of 8 bytes.  This can make the request look slightly longer than it
      really is.
      
      As of
      
      	f34b9568
      
       "The NFSv2/NFSv3 server does not handle zero
      		length WRITE request correctly",
      
      the xdr decode routines for NFSv2 and NFSv3 reject requests that aren't
      the right length, so krb5i (for example) WRITE requests can get lost.
      
      This patch relaxes the appropriate test and enhances the related comment.
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Peter Staubach <staubach@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ba67a39e
    • Roland McGrath's avatar
      remove task_ppid_nr_ns · 84427eae
      Roland McGrath authored
      
      
      task_ppid_nr_ns is called in three places.  One of these should never
      have called it.  In the other two, using it broke the existing
      semantics.  This was presumably accidental.  If the function had not
      been there, it would have been much more obvious to the eye that those
      patches were changing the behavior.  We don't need this function.
      
      In task_state, the pid of the ptracer is not the ppid of the ptracer.
      
      In do_task_stat, ppid is the tgid of the real_parent, not its pid.
      I also moved the call outside of lock_task_sighand, since it doesn't
      need it.
      
      In sys_getppid, ppid is the tgid of the real_parent, not its pid.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      84427eae
  7. 12 Jan, 2008 1 commit
  8. 11 Jan, 2008 1 commit
  9. 10 Jan, 2008 1 commit
  10. 08 Jan, 2008 3 commits
    • Eric Sandeen's avatar
      hfs: handle more on-disk corruptions without oopsing · cf059462
      Eric Sandeen authored
      
      
      hfs seems prone to bad things when it encounters on disk corruption.  Many
      values are read from disk, and used as lengths to memcpy, as an example.
      This patch fixes up several of these problematic cases.
      
      o sanity check the on-disk maximum key lengths on mount
        (these are set to a defined value at mkfs time and shouldn't differ)
      o check on-disk node keylens against the maximum key length for each tree
      o fix hfs_btree_open so that going out via free_tree: doesn't wind
        up in hfs_releasepage, which wants to follow the very pointer
        we were trying to set up:
      	HFS_SB(sb)->cat_tree = hfs_btree_open()
      		...
      		failure gets to hfs_releasepage and tries
      		to follow HFS_SB(sb)->cat_tree
      
      Tested with the fsfuzzer; it survives more than it used to.
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cf059462
    • Michael Halcrow's avatar
      eCryptfs: fix dentry handling on create error, unlink, and inode destroy · caeeeecf
      Michael Halcrow authored
      
      
      This patch corrects some erroneous dentry handling in eCryptfs.
      
      If there is a problem creating the lower file, then there is nothing that
      the persistent lower file can do to really help us.  This patch makes a
      vfs_create() failure in the lower filesystem always lead to an
      unconditional do_create failure in eCryptfs.
      
      Under certain sequences of operations, the eCryptfs dentry can remain in
      the dcache after an unlink.  This patch calls d_drop() on the eCryptfs
      dentry to correct this.
      
      eCryptfs has no business calling d_delete() directly on a lower
      filesystem's dentry.  This patch removes the call to d_delete() on the
      lower persistent file's dentry in ecryptfs_destroy_inode().
      
      (Thanks to David Kleikamp, Eric Sandeen, and Jeff Moyer for helping
      identify and resolve this issue)
      Signed-off-by: default avatarMichael Halcrow <mhalcrow@us.ibm.com>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Eric Sandeen <sandeen@redhat.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      caeeeecf
    • OGAWA Hirofumi's avatar
      fat: optimize fat_count_free_clusters() · 9f966be8
      OGAWA Hirofumi authored
      
      
      On large partition, scanning the free clusters is very slow if users
      doesn't use "usefree" option.
      
      For optimizing it, this patch uses sb_breadahead() to read of FAT
      sectors. On some user's 15GB partition, this patch improved it very
      much (1min => 600ms).
      
      The following is the result of 2GB partition on my machine.
      
      without patch:
      	root@devron (/)# time df -h > /dev/null
      
      	real    0m1.202s
      	user    0m0.000s
      	sys     0m0.440s
      
      with patch:
      	root@devron (/)# time df -h > /dev/null
      
      	real    0m0.378s
      	user    0m0.012s
      	sys     0m0.168s
      Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9f966be8
  11. 07 Jan, 2008 1 commit
  12. 06 Jan, 2008 1 commit
  13. 03 Jan, 2008 4 commits
    • Trond Myklebust's avatar
      NFSv4: Fix open_to_lock_owner sequenceid allocation... · e6e21970
      Trond Myklebust authored
      
      
      NFSv4 file locking is currently completely broken since it doesn't respect
      the OPEN sequencing when it is given an unconfirmed lock_owner and needs to
      do an open_to_lock_owner. Worse: it breaks the sunrpc rules by doing a
      GFP_KERNEL allocation inside an rpciod callback.
      
      Fix is to preallocate the open seqid structure in nfs4_alloc_lockdata if we
      see that the lock_owner is unconfirmed.
      Then, in nfs4_lock_prepare() we wait for either the open_seqid, if
      the lock_owner is still unconfirmed, or else fall back to waiting on the
      standard lock_seqid.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      e6e21970
    • Trond Myklebust's avatar
      NFSv4: nfs4_open_confirm must not set the open_owner as confirmed on error · bb22629e
      Trond Myklebust authored
      
      
      RFC3530 states that the open_owner is confirmed if and only if the client
      sends an OPEN_CONFIRM request with the appropriate sequence id and stateid
      within the lease period.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      bb22629e
    • Trond Myklebust's avatar
      NFSv4: Fix circular locking dependency in nfs4_kill_renewd · b274b48f
      Trond Myklebust authored
      
      
      Erez Zadok reports:
      
      =======================================================
      [ INFO: possible circular locking dependency detected ]
      2.6.24-rc6-unionfs2 #80
      -------------------------------------------------------
      umount.nfs4/4017 is trying to acquire lock:
       (&(&clp->cl_renewd)->work){--..}, at: [<c0223e53>]
      __cancel_work_timer+0x83/0x17f
      
      but task is already holding lock:
       (&clp->cl_sem){----}, at: [<f8879897>] nfs4_kill_renewd+0x17/0x29 [nfs]
      
      which lock already depends on the new lock.
      
      
      the existing dependency chain (in reverse order) is:
      
      -> #1 (&clp->cl_sem){----}:
             [<c0230699>] __lock_acquire+0x9cc/0xb95
             [<c0230c39>] lock_acquire+0x5f/0x78
             [<c0397cb8>] down_read+0x3a/0x4c
             [<f88798e6>] nfs4_renew_state+0x1c/0x1b8 [nfs]
             [<c0223821>] run_workqueue+0xd9/0x1ac
             [<c0224220>] worker_thread+0x7a/0x86
             [<c0226b49>] kthread+0x3b/0x62
             [<c02033a3>] kernel_thread_helper+0x7/0x10
             [<ffffffff>] 0xffffffff
      
      -> #0 (&(&clp->cl_renewd)->work){--..}:
             [<c0230589>] __lock_acquire+0x8bc/0xb95
             [<c0230c39>] lock_acquire+0x5f/0x78
             [<c0223e87>] __cancel_work_timer+0xb7/0x17f
             [<c0223f5a>] cancel_delayed_work_sync+0xb/0xd
             [<f887989e>] nfs4_kill_renewd+0x1e/0x29 [nfs]
             [<f885a8f6>] nfs_free_client+0x37/0x9e [nfs]
             [<f885ab20>] nfs_put_client+0x5d/0x62 [nfs]
             [<f885ab9a>] nfs_free_server+0x75/0xae [nfs]
             [<f8862672>] nfs4_kill_super+0x27/0x2b [nfs]
             [<c0258aab>] deactivate_super+0x3f/0x51
             [<c0269668>] mntput_no_expire+0x42/0x67
             [<c025d0e4>] path_release_on_umount+0x15/0x18
             [<c0269d30>] sys_umount+0x1a3/0x1cb
             [<c0269d71>] sys_oldumount+0x19/0x1b
             [<c02026ca>] sysenter_past_esp+0x5f/0xa5
             [<ffffffff>] 0xffffffff
      
      Looking at the code, it would seem that taking the clp->cl_sem in
      nfs4_kill_renewd is completely redundant, since we're already guaranteed to
      have exclusive access to the nfs_client (we're shutting down).
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      b274b48f
    • Trond Myklebust's avatar
      NFS: Fix a possible Oops in fs/nfs/super.c · e9cc6c23
      Trond Myklebust authored
      Sigh... commit 4584f520 (NFS: Fix NFS
      mountpoint crossing...) had a slight flaw: server can be NULL if sget()
      returned an existing superblock.
      
      Fix the fix by dereferencing s->s_fs_info.
      
      Thanks to Coverity/Adrian Bunk and Frank Filz for spotting the bug.
      (See http://bugzilla.kernel.org/show_bug.cgi?id=9647
      
      )
      
      Also add in the same namespace Oops fix for NFSv4 in both the mountpoint
      crossing case, and the referral case.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      e9cc6c23
  14. 02 Jan, 2008 3 commits
  15. 23 Dec, 2007 5 commits
  16. 20 Dec, 2007 3 commits
  17. 17 Dec, 2007 5 commits