1. 07 1月, 2009 9 次提交
    • C
      NLM: Move the public declaration of nsm_unmonitor() to lockd.h · 356c3eb4
      Chuck Lever 提交于
      Clean up.
      
      Make the nlm_host argument "const," and move the public declaration to
      lockd.h.  Add a documenting comment.
      
      Bruce observed that nsm_unmonitor()'s only caller doesn't care about
      its return code, so make nsm_unmonitor() return void.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      356c3eb4
    • C
      NSM: Release nsmhandle in nlm_destroy_host · c8c23c42
      Chuck Lever 提交于
      The nsm_handle's reference count is bumped in nlm_lookup_host().  It
      should be decremented in nlm_destroy_host() to make it easier to see
      the balance of these two operations.
      
      Move the nsm_release() call to fs/lockd/host.c.
      
      The h_nsmhandle pointer is set in nlm_lookup_host(), and never cleared.
      The nlm_destroy_host() function is never called for the same nlm_host
      twice, so h_nsmhandle won't ever be NULL when nsm_unmonitor() is
      called.
      
      All references to the nlm_host are gone before it is freed.  We can
      skip making h_nsmhandle NULL just before the nlm_host is deallocated.
      
      It's also likely we can remove the h_nsmhandle NULL check in
      nlmsvc_is_client() as well, but we can do that later when rearchitect-
      ing the nlm_host cache.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      c8c23c42
    • C
      NLM: Move the public declaration of nsm_monitor() to lockd.h · 1e49323c
      Chuck Lever 提交于
      Clean up.
      
      Make the nlm_host argument "const," and move the public declaration to
      lockd.h with other NSM public function (nsm_release, eg) and global
      variable declarations.
      
      Add a documenting comment.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      1e49323c
    • C
      NSM: Make sure to return an error if the SM_MON call result is not zero · 5d254b11
      Chuck Lever 提交于
      The nsm_monitor() function reports an error and does not set sm_monitored
      if the SM_MON upcall reply has a non-zero result code, but nsm_monitor()
      does not return an error to its caller in this case.
      
      Since sm_monitored is not set, the upcall is retried when the next NLM
      request invokes nsm_monitor().  However, that may not come for a while.
      In the meantime, at least one NLM request will potentially proceed
      without the peer being monitored properly.
      
      Have nsm_monitor() return an error if the result code is non-zero.
      This will cause all NLM requests to fail immediately if the upcall
      completed successfully but rpc.statd returned an error.
      
      This may be inconvenient in some cases (for example if rpc.statd
      cannot complete a proper DNS reverse lookup of the hostname), but will
      make the reboot monitoring service more robust by forcing such issues
      to be corrected by an admin.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      5d254b11
    • C
      NSM: Remove BUG_ON() in nsm_monitor() · 5bc74bef
      Chuck Lever 提交于
      Clean up: Remove the BUG_ON() invocation in nsm_monitor().  It's not
      likely that nsm_monitor() is ever called with a NULL host pointer, and
      the code will die anyway if host is NULL.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      5bc74bef
    • C
      NSM: Use sm_name instead of h_name in nsm_monitor() and nsm_unmonitor() · 9fee4902
      Chuck Lever 提交于
      Clean up: Use the sm_name field for reporting the hostname in nsm_monitor()
      and nsm_unmonitor(), just as the other functions in fs/lockd/mon.c do.
      
      The h_name field is just a copy of the sm_name pointer.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      9fee4902
    • C
      NSM: Support IPv6 version of mon_name · 29ed1407
      Chuck Lever 提交于
      The "mon_name" argument of the NSMPROC_MON and NSMPROC_UNMON upcalls
      is a string that contains the hostname or IP address of the remote peer
      to be notified when this host has rebooted.  The sm-notify command uses
      this identifier to contact the peer when we reboot, so it must be
      either a well-qualified DNS hostname or a presentation format IP
      address string.
      
      When the "nsm_use_hostnames" sysctl is set to zero, the kernel's NSM
      provides a presentation format IP address in the "mon_name" argument.
      Otherwise, the "caller_name" argument from NLM requests is used,
      which is usually just the DNS hostname of the peer.
      
      To support IPv6 addresses for the mon_name argument, we use the
      nsm_handle's address eye-catcher, which already contains an appropriate
      presentation format address string.  Using the eye-catcher string
      obviates the need to use a large buffer on the stack to form the
      presentation address string for the upcall.
      
      This patch also addresses a subtle bug.
      
      An NSMPROC_MON request and the subsequent NSMPROC_UNMON request for the
      same peer are required to use the same value for the "mon_name"
      argument.  Otherwise, rpc.statd's NSMPROC_UNMON processing cannot
      locate the database entry for that peer and remove it.
      
      If the setting of nsm_use_hostnames is changed between the time the
      kernel sends an NSMPROC_MON request and the time it sends the
      NSMPROC_UNMON request for the same peer, the "mon_name" argument for
      these two requests may not be the same.  This is because the value of
      "mon_name" is currently chosen at the moment the call is made based on
      the setting of nsm_use_hostnames
      
      To ensure both requests pass identical contents in the "mon_name"
      argument, we now select which string to use for the argument in the
      nsm_monitor() function.  A pointer to this string is saved in the
      nsm_handle so it can be used for a subsequent NSMPROC_UNMON upcall.
      
      NB: There are other potential problems, such as how nlm_host_rebooted()
      might behave if nsm_use_hostnames were changed while hosts are still
      being monitored.  This patch does not attempt to address those
      problems.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      29ed1407
    • C
      NSM: convert printk(KERN_DEBUG) to a dprintk() · 5acf4315
      Chuck Lever 提交于
      Clean up: make the printk(KERN_DEBUG) in nsm_mon_unmon() a dprintk,
      and add another dprintk to note if creating an RPC client for the
      upcall failed.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      5acf4315
    • C
      NSM: Use C99 structure initializer to initialize nsm_args · a4846750
      Chuck Lever 提交于
      Clean up: Use a C99 structure initializer instead of open-coding the
      initialization of nsm_args.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      a4846750
  2. 31 10月, 2008 1 次提交
  3. 30 9月, 2008 1 次提交
  4. 20 3月, 2008 6 次提交
  5. 10 10月, 2007 1 次提交
  6. 11 7月, 2007 1 次提交
  7. 01 5月, 2007 1 次提交
    • C
      SUNRPC: RPC buffer size estimates are too large · 2bea90d4
      Chuck Lever 提交于
      The RPC buffer size estimation logic in net/sunrpc/clnt.c always
      significantly overestimates the requirements for the buffer size.
      A little instrumentation demonstrated that in fact rpc_malloc was never
      allocating the buffer from the mempool, but almost always called kmalloc.
      
      To compute the size of the RPC buffer more precisely, split p_bufsiz into
      two fields; one for the argument size, and one for the result size.
      
      Then, compute the sum of the exact call and reply header sizes, and split
      the RPC buffer precisely between the two.  That should keep almost all RPC
      buffers within the 2KiB buffer mempool limit.
      
      And, we can finally be rid of RPC_SLACK_SPACE!
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2bea90d4
  8. 21 10月, 2006 1 次提交
  9. 04 10月, 2006 5 次提交
  10. 02 10月, 2006 1 次提交
  11. 23 9月, 2006 1 次提交
  12. 24 3月, 2006 1 次提交
  13. 21 3月, 2006 2 次提交
  14. 07 1月, 2006 1 次提交
  15. 23 6月, 2005 2 次提交
  16. 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
反馈
建议
客服 返回
顶部