1. 05 10月, 2008 1 次提交
    • C
      NLM: Always start both UDP and TCP listeners · 8c3916f4
      Chuck Lever 提交于
      Commit 24e36663, which first appeared in 2.6.19, changed lockd so that
      the client side starts a UDP listener only if there is a UDP NFSv2/v3
      mount.  Its description notes:
      
          This... means that lockd will *not* listen on UDP if the only
          mounts are TCP mount (and nfsd hasn't started).
      
          The latter is the only one that concerns me at all - I don't know
          if this might be a problem with some servers.
      
      Unfortunately it is a problem for Linux itself.  The rpc.statd daemon
      on Linux uses UDP for contacting the local lockd, no matter which
      protocol is used for NFS mounts.  Without a local lockd UDP listener,
      NFSv2/v3 lock recovery from Linux NFS clients always fails.
      
      Revert parts of commit 24e36663 so lockd_up() always starts both
      listeners.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      8c3916f4
  2. 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
  3. 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
  4. 24 6月, 2008 1 次提交
  5. 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
  6. 20 3月, 2008 1 次提交
  7. 22 2月, 2008 1 次提交
  8. 02 2月, 2008 4 次提交
  9. 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
  10. 11 7月, 2007 1 次提交
  11. 18 2月, 2007 1 次提交
  12. 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
  13. 13 2月, 2007 2 次提交
  14. 06 11月, 2006 1 次提交
  15. 04 10月, 2006 2 次提交
  16. 02 10月, 2006 5 次提交
  17. 01 7月, 2006 1 次提交
  18. 27 3月, 2006 1 次提交
    • I
      [PATCH] sem2mutex: fs/ · 353ab6e9
      Ingo Molnar 提交于
      Semaphore to mutex conversion.
      
      The conversion was generated via scripts, and the result was validated
      automatically via a script as well.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
      Cc: Robert Love <rml@tech9.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      353ab6e9
  19. 24 3月, 2006 1 次提交
  20. 07 1月, 2006 1 次提交
  21. 14 7月, 2005 1 次提交
  22. 24 6月, 2005 1 次提交
  23. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4