1. 27 1月, 2010 1 次提交
  2. 19 11月, 2009 1 次提交
  3. 12 11月, 2009 1 次提交
  4. 07 5月, 2009 1 次提交
    • J
      lockd: fix list corruption on lockd restart · 89996df4
      J. Bruce Fields 提交于
      If lockd is signalled soon enough after restart then locks_start_grace()
      will try to re-add an entry to a list and trigger a lock corruption
      warning.
      
      Thanks to Wang Chen for the problem report and diagnosis.
      
      WARNING: at lib/list_debug.c:26 __list_add+0x27/0x5c()
      ...
      list_add corruption. next->prev should be prev (ef8fe958), but was ef8ff128.  (next=ef8ff128).
      ...
      Pid: 23062, comm: lockd Tainted: G        W  2.6.30-rc2 #3
      Call Trace:
      [<c042d5b5>] warn_slowpath+0x71/0xa0
      [<c0422a96>] ? update_curr+0x11d/0x125
      [<c044b12d>] ? trace_hardirqs_on_caller+0x18/0x150
      [<c044b270>] ? trace_hardirqs_on+0xb/0xd
      [<c051c61a>] ? _raw_spin_lock+0x53/0xfa
      [<c051c89f>] __list_add+0x27/0x5c
      [<ef8f6daa>] locks_start_grace+0x22/0x30 [lockd]
      [<ef8f34da>] set_grace_period+0x39/0x53 [lockd]
      [<c06b8921>] ? lock_kernel+0x1c/0x28
      [<ef8f3558>] lockd+0x64/0x164 [lockd]
      [<c044b12d>] ? trace_hardirqs_on_caller+0x18/0x150
      [<c04227b0>] ? complete+0x34/0x3e
      [<ef8f34f4>] ? lockd+0x0/0x164 [lockd]
      [<ef8f34f4>] ? lockd+0x0/0x164 [lockd]
      [<c043dd42>] kthread+0x45/0x6b
      [<c043dcfd>] ? kthread+0x0/0x6b
      [<c0403c23>] kernel_thread_helper+0x7/0x10
      Reported-by: NWang Chen <wangchen@cn.fujitsu.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: stable@kernel.org
      89996df4
  5. 29 3月, 2009 4 次提交
  6. 08 1月, 2009 2 次提交
  7. 07 1月, 2009 4 次提交
  8. 24 12月, 2008 1 次提交
  9. 25 11月, 2008 1 次提交
  10. 05 10月, 2008 2 次提交
  11. 04 10月, 2008 1 次提交
    • J
      nfsd: common grace period control · af558e33
      J. Bruce Fields 提交于
      Rewrite grace period code to unify management of grace period across
      lockd and nfsd.  The current code has lockd and nfsd cooperate to
      compute a grace period which is satisfactory to them both, and then
      individually enforce it.  This creates a slight race condition, since
      the enforcement is not coordinated.  It's also more complicated than
      necessary.
      
      Here instead we have lockd and nfsd each inform common code when they
      enter the grace period, and when they're ready to leave the grace
      period, and allow normal locking only after both of them are ready to
      leave.
      
      We also expect the locks_start_grace()/locks_end_grace() interface here
      to be simpler to build on for future cluster/high-availability work,
      which may require (for example) putting individual filesystems into
      grace, or enforcing grace periods across multiple cluster nodes.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      af558e33
  12. 30 9月, 2008 3 次提交
    • J
      lockd: don't depend on lockd main loop to end grace · c8ab5f2a
      J. Bruce Fields 提交于
      End lockd's grace period using schedule_delayed_work() instead of a
      check on every pass through the main loop.
      
      After a later patch, we'll depend on lockd to end its grace period even
      if it's not currently handling requests; so it shouldn't depend on being
      woken up from the main loop to do so.
      
      Also, Nakano Hiroaki (who independently produced a similar patch)
      noticed that the current behavior is buggy in the face of jiffies
      wraparound:
      
      	"lockd uses time_before() to determine whether the grace period
      	has expired. This would seem to be enough to avoid timer
      	wrap-around issues, but, unfortunately, that is not the case.
      	The time_* family of comparison functions can be safely used to
      	compare jiffies relatively close in time, but they stop working
      	after approximately LONG_MAX/2 ticks. nfsd can suffer this
      	problem because the time_before() comparison in lockd() is not
      	performed until the first request comes in, which means that if
      	there is no lockd traffic for more than LONG_MAX/2 ticks we are
      	screwed.
      
      	"The implication of this is that once time_before() starts
      	misbehaving any attempt from a NFS client to execute fcntl()
      	will be received with a NLM_LCK_DENIED_GRACE_PERIOD message for
      	25 days (assuming HZ=1000). In other words, the 50 seconds grace
      	period could turn into a grace period of 50 days or more.
      
      	"Note: This bug was analyzed independently by Oda-san
      	<oda@valinux.co.jp> and myself."
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Nakano Hiroaki <nakano.hiroaki@oss.ntt.co.jp>
      Cc: Itsuro Oda <oda@valinux.co.jp>
      c8ab5f2a
    • J
      locks: allow lockd to process blocked locks during grace period · 8fafa900
      J. Bruce Fields 提交于
      The check here is currently harmless but unnecessary, since, as the
      comment notes, there aren't any blocked-lock callbacks to process
      during the grace period anyway.
      
      And eventually we want to allow multiple grace periods that come and go
      for different filesystems over the course of the lifetime of lockd, at
      which point this check is just going to get in the way.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      8fafa900
    • C
      SUNRPC: Add address family field to svc_serv data structure · e851db5b
      Chuck Lever 提交于
      Introduce and initialize an address family field in the svc_serv structure.
      
      This field will determine what family to use for the service's listener
      sockets and what families are advertised via the local rpcbind daemon.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      e851db5b
  13. 24 6月, 2008 1 次提交
  14. 24 4月, 2008 2 次提交
    • J
      NLM: don't let lockd exit on unexpected svc_recv errors (try #2) · f97c650d
      Jeff Layton 提交于
      When svc_recv returns an unexpected error, lockd will print a warning
      and exit. This problematic for several reasons. In particular, it will
      cause the reference counts for the thread to be wrong, and can lead to a
      potential BUG() call.
      
      Rather than exiting on error from svc_recv, have the thread do a 1s
      sleep and then retry the loop. This is unlikely to cause any harm, and
      if the error turns out to be something temporary then it may be able to
      recover.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      f97c650d
    • J
      NLM: Convert lockd to use kthreads · d751a7cd
      Jeff Layton 提交于
      Have lockd_up start lockd using kthread_run. With this change,
      lockd_down now blocks until lockd actually exits, so there's no longer
      need for the waitqueue code at the end of lockd_down. This also means
      that only one lockd can be running at a time which simplifies the code
      within lockd's main loop.
      
      This also adds a check for kthread_should_stop in the main loop of
      nlmsvc_retry_blocked and after that function returns. There's no sense
      continuing to retry blocks if lockd is coming down anyway.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      d751a7cd
  15. 20 3月, 2008 1 次提交
  16. 22 2月, 2008 1 次提交
  17. 02 2月, 2008 4 次提交
  18. 18 7月, 2007 2 次提交
    • M
      knfsd: lockd: nfsd4: use same grace period for lockd and nfsd4 · 9a8db97e
      Marc Eshel 提交于
      Both lockd and (in the nfsv4 case) nfsd enforce a "grace period" after reboot,
      during which clients may reclaim locks from the previous server instance, but
      may not acquire new locks.
      
      Currently the lockd and nfsd enforce grace periods of different lengths.  This
      may cause problems when we reboot a server with both v2/v3 and v4 clients.
      For example, if the lockd grace period is shorter (as is likely the case),
      then a v3 client might acquire a new lock that conflicts with a lock already
      held (but not yet reclaimed) by a v4 client.
      
      This patch calculates a lease time that lockd and nfsd can both use.
      Signed-off-by: NMarc Eshel <eshel@almaden.ibm.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9a8db97e
    • R
      Freezer: make kernel threads nonfreezable by default · 83144186
      Rafael J. Wysocki 提交于
      Currently, the freezer treats all tasks as freezable, except for the kernel
      threads that explicitly set the PF_NOFREEZE flag for themselves.  This
      approach is problematic, since it requires every kernel thread to either
      set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
      care for the freezing of tasks at all.
      
      It seems better to only require the kernel threads that want to or need to
      be frozen to use some freezer-related code and to remove any
      freezer-related code from the other (nonfreezable) kernel threads, which is
      done in this patch.
      
      The patch causes all kernel threads to be nonfreezable by default (ie.  to
      have PF_NOFREEZE set by default) and introduces the set_freezable()
      function that should be called by the freezable kernel threads in order to
      unset PF_NOFREEZE.  It also makes all of the currently freezable kernel
      threads call set_freezable(), so it shouldn't cause any (intentional)
      change of behaviour to appear.  Additionally, it updates documentation to
      describe the freezing of tasks more accurately.
      
      [akpm@linux-foundation.org: build fixes]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NNigel Cunningham <nigel@nigel.suspend2.net>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      83144186
  19. 11 7月, 2007 1 次提交
  20. 18 2月, 2007 1 次提交
  21. 15 2月, 2007 1 次提交
    • E
      [PATCH] sysctl: remove insert_at_head from register_sysctl · 0b4d4147
      Eric W. Biederman 提交于
      The semantic effect of insert_at_head is that it would allow new registered
      sysctl entries to override existing sysctl entries of the same name.  Which is
      pain for caching and the proc interface never implemented.
      
      I have done an audit and discovered that none of the current users of
      register_sysctl care as (excpet for directories) they do not register
      duplicate sysctl entries.
      
      So this patch simply removes the support for overriding existing entries in
      the sys_sysctl interface since no one uses it or cares and it makes future
      enhancments harder.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: David Chinner <dgc@sgi.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Patrick McHardy <kaber@trash.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0b4d4147
  22. 13 2月, 2007 2 次提交
  23. 06 11月, 2006 1 次提交
  24. 04 10月, 2006 1 次提交