1. 20 7月, 2007 4 次提交
  2. 18 7月, 2007 7 次提交
  3. 14 7月, 2007 1 次提交
  4. 10 7月, 2007 3 次提交
  5. 17 2月, 2007 1 次提交
  6. 31 1月, 2007 1 次提交
  7. 27 1月, 2007 3 次提交
    • N
      [PATCH] knfsd: Fix type mismatch with filldir_t used by nfsd · a0ad13ef
      NeilBrown 提交于
      nfsd defines a type 'encode_dent_fn' which is much like 'filldir_t' except
      that the first pointer is 'struct readdir_cd *' rather than 'void *'.  It
      then casts encode_dent_fn points to 'filldir_t' as needed.  This hides any
      other type mismatches between the two such as the fact that the 'ino' arg
      recently changed from ino_t to u64.
      
      So: get rid of 'encode_dent_fn', get rid of the cast of the function type,
      change the first arg of various functions from 'struct readdir_cd *' to
      'void *', and live with the fact that we have a little less type checking
      on the calling of these functions now.  Less internal (to nfsd) checking
      offset by more external checking, which is more important.
      
      Thanks to Gabriel Paubert <paubert@iram.es> for discovering this and
      providing an initial patch.
      Signed-off-by: NGabriel Paubert <paubert@iram.es>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a0ad13ef
    • P
      [PATCH] knfsd: Don't mess with the 'mode' when storing a exclusive-create cookie · c397852c
      Peter Staubach 提交于
      NFS V3 (and V4) support exclusive create by passing a 'cookie' which can get
      stored with the file.  If the file exists but has exactly the right cookie
      stored, then we assume this is a retransmit and the exclusive create was
      successful.
      
      The cookie is 64bits and is traditionally stored in the mtime and atime
      fields.  This causes a problem with Solaris7 as negative mtime or atime
      confuse it.  So we moved two bits into the mode word instead.
      
      But inherited ACLs sometimes overwrite the mode word on create, so this is a
      problem.
      
      So we give up and just store 62 of the 64 bits and assume that is close
      enough.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c397852c
    • N
      [PATCH] knfsd: fix an NFSD bug with full sized, non-page-aligned reads · 250f3915
      NeilBrown 提交于
      NFSd assumes that largest number of pages that will be needed for a
      request+response is 2+N where N pages is the size of the largest permitted
      read/write request.  The '2' are 1 for the non-data part of the request, and 1
      for the non-data part of the reply.
      
      However, when a read request is not page-aligned, and we choose to use
      ->sendfile to send it directly from the page cache, we may need N+1 pages to
      hold the whole reply.  This can overflow and array and cause an Oops.
      
      This patch increases size of the array for holding pages by one and makes sure
      that entry is NULL when it is not in use.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      250f3915
  8. 14 12月, 2006 1 次提交
    • J
      [PATCH] knfsd: nfsd: don't drop silently on upcall deferral · e0bb89ef
      J.Bruce Fields 提交于
      To avoid tying up server threads when nfsd makes an upcall (to mountd, to get
      export options, to idmapd, for nfsv4 name<->id mapping, etc.), we temporarily
      "drop" the request and save enough information so that we can revisit it
      later.
      
      Certain failures during the deferral process can cause us to really drop the
      request and never revisit it.
      
      This is often less than ideal, and is unacceptable in the NFSv4 case--rfc 3530
      forbids the server from dropping a request without also closing the
      connection.
      
      As a first step, we modify the deferral code to return -ETIMEDOUT (which is
      translated to nfserr_jukebox in the v3 and v4 cases, and remains a drop in the
      v2 case).
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e0bb89ef
  9. 09 12月, 2006 2 次提交
  10. 09 11月, 2006 2 次提交
  11. 21 10月, 2006 1 次提交
  12. 04 10月, 2006 3 次提交
    • J
      [PATCH] knfsd: nfsd4: acls: fix handling of zero-length acls · b66285ce
      J.Bruce Fields 提交于
      It is legal to have zero-length NFSv4 acls; they just deny everything.
      
      Also, nfs4_acl_nfsv4_to_posix will always return with pacl and dpacl set on
      success, so the caller doesn't need to check this.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b66285ce
    • G
      [PATCH] knfsd: make nfsd readahead params cache SMP-friendly · fce1456a
      Greg Banks 提交于
      Make the nfsd read-ahead params cache more SMP-friendly by changing the single
      global list and lock into a fixed 16-bucket hashtable with per-bucket locks.
      This reduces spinlock contention in nfsd_read() on read-heavy workloads on
      multiprocessor servers.
      
      Testing was on a 4 CPU 4 NIC Altix using 4 IRIX clients each doing 1K
      streaming reads at full line rate.  The server had 128 nfsd threads, which
      sizes the RA cache at 256 entries, of which only a handful were used.  Flat
      profiling shows nfsd_read(), including the inlined nfsd_get_raparms(), taking
      10.4% of each CPU.  This patch drops the contribution from nfsd() to 1.71% for
      each CPU.
      Signed-off-by: NGreg Banks <gnb@melbourne.sgi.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fce1456a
    • N
      [PATCH] knfsd: Replace two page lists in struct svc_rqst with one · 44524359
      NeilBrown 提交于
      We are planning to increase RPCSVC_MAXPAGES from about 8 to about 256.  This
      means we need to be a bit careful about arrays of size RPCSVC_MAXPAGES.
      
      struct svc_rqst contains two such arrays.  However the there are never more
      that RPCSVC_MAXPAGES pages in the two arrays together, so only one array is
      needed.
      
      The two arrays are for the pages holding the request, and the pages holding
      the reply.  Instead of two arrays, we can simply keep an index into where the
      first reply page is.
      
      This patch also removes a number of small inline functions that probably
      server to obscure what is going on rather than clarify it, and opencode the
      needed functionality.
      
      Also remove the 'rq_restailpage' variable as it is *always* 0.  i.e.  if the
      response 'xdr' structure has a non-empty tail it is always in the same pages
      as the head.
      
       check counters are initilised and incr properly
       check for consistant usage of ++ etc
       maybe extra some inlines for common approach
       general review
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Cc: Magnus Maatta <novell@kiruna.se>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      44524359
  13. 02 10月, 2006 1 次提交
    • P
      [PATCH] nfsd: lockdep annotation · 12fd3520
      Peter Zijlstra 提交于
      while doing a kernel make modules_install install over an NFS mount.
      
        =============================================
        [ INFO: possible recursive locking detected ]
        ---------------------------------------------
        nfsd/9550 is trying to acquire lock:
         (&inode->i_mutex){--..}, at: [<c034c845>] mutex_lock+0x1c/0x1f
      
        but task is already holding lock:
         (&inode->i_mutex){--..}, at: [<c034c845>] mutex_lock+0x1c/0x1f
      
        other info that might help us debug this:
        2 locks held by nfsd/9550:
         #0:  (hash_sem){..--}, at: [<cc895223>] exp_readlock+0xd/0xf [nfsd]
         #1:  (&inode->i_mutex){--..}, at: [<c034c845>] mutex_lock+0x1c/0x1f
      
        stack backtrace:
         [<c0103508>] show_trace_log_lvl+0x58/0x152
         [<c0103b8b>] show_trace+0xd/0x10
         [<c0103c2f>] dump_stack+0x19/0x1b
         [<c012aa57>] __lock_acquire+0x77a/0x9a3
         [<c012af4a>] lock_acquire+0x60/0x80
         [<c034c6c2>] __mutex_lock_slowpath+0xa7/0x20e
         [<c034c845>] mutex_lock+0x1c/0x1f
         [<c0162edc>] vfs_unlink+0x34/0x8a
         [<cc891d98>] nfsd_unlink+0x18f/0x1e2 [nfsd]
         [<cc89884f>] nfsd3_proc_remove+0x95/0xa2 [nfsd]
         [<cc88f0d4>] nfsd_dispatch+0xc0/0x178 [nfsd]
         [<c033e84d>] svc_process+0x3a5/0x5ed
         [<cc88f5ba>] nfsd+0x1a7/0x305 [nfsd]
         [<c0101005>] kernel_thread_helper+0x5/0xb
        DWARF2 unwinder stuck at kernel_thread_helper+0x5/0xb
        Leftover inexact backtrace:
         [<c0103b8b>] show_trace+0xd/0x10
         [<c0103c2f>] dump_stack+0x19/0x1b
         [<c012aa57>] __lock_acquire+0x77a/0x9a3
         [<c012af4a>] lock_acquire+0x60/0x80
         [<c034c6c2>] __mutex_lock_slowpath+0xa7/0x20e
         [<c034c845>] mutex_lock+0x1c/0x1f
         [<c0162edc>] vfs_unlink+0x34/0x8a
         [<cc891d98>] nfsd_unlink+0x18f/0x1e2 [nfsd]
         [<cc89884f>] nfsd3_proc_remove+0x95/0xa2 [nfsd]
         [<cc88f0d4>] nfsd_dispatch+0xc0/0x178 [nfsd]
         [<c033e84d>] svc_process+0x3a5/0x5ed
         [<cc88f5ba>] nfsd+0x1a7/0x305 [nfsd]
         [<c0101005>] kernel_thread_helper+0x5/0xb
      
        =============================================
        [ INFO: possible recursive locking detected ]
        ---------------------------------------------
        nfsd/9580 is trying to acquire lock:
         (&inode->i_mutex){--..}, at: [<c034cc1d>] mutex_lock+0x1c/0x1f
      
        but task is already holding lock:
         (&inode->i_mutex){--..}, at: [<c034cc1d>] mutex_lock+0x1c/0x1f
      
        other info that might help us debug this:
        2 locks held by nfsd/9580:
         #0:  (hash_sem){..--}, at: [<cc89522b>] exp_readlock+0xd/0xf [nfsd]
         #1:  (&inode->i_mutex){--..}, at: [<c034cc1d>] mutex_lock+0x1c/0x1f
      
        stack backtrace:
         [<c0103508>] show_trace_log_lvl+0x58/0x152
         [<c0103b8b>] show_trace+0xd/0x10
         [<c0103c2f>] dump_stack+0x19/0x1b
         [<c012aa63>] __lock_acquire+0x77a/0x9a3
         [<c012af56>] lock_acquire+0x60/0x80
         [<c034ca9a>] __mutex_lock_slowpath+0xa7/0x20e
         [<c034cc1d>] mutex_lock+0x1c/0x1f
         [<cc892ad1>] nfsd_setattr+0x2c8/0x499 [nfsd]
         [<cc893ede>] nfsd_create_v3+0x31b/0x4ac [nfsd]
         [<cc8984a1>] nfsd3_proc_create+0x128/0x138 [nfsd]
         [<cc88f0d4>] nfsd_dispatch+0xc0/0x178 [nfsd]
         [<c033ec1d>] svc_process+0x3a5/0x5ed
         [<cc88f5ba>] nfsd+0x1a7/0x305 [nfsd]
         [<c0101005>] kernel_thread_helper+0x5/0xb
        DWARF2 unwinder stuck at kernel_thread_helper+0x5/0xb
        Leftover inexact backtrace:
         [<c0103b8b>] show_trace+0xd/0x10
         [<c0103c2f>] dump_stack+0x19/0x1b
         [<c012aa63>] __lock_acquire+0x77a/0x9a3
         [<c012af56>] lock_acquire+0x60/0x80
         [<c034ca9a>] __mutex_lock_slowpath+0xa7/0x20e
         [<c034cc1d>] mutex_lock+0x1c/0x1f
         [<cc892ad1>] nfsd_setattr+0x2c8/0x499 [nfsd]
         [<cc893ede>] nfsd_create_v3+0x31b/0x4ac [nfsd]
         [<cc8984a1>] nfsd3_proc_create+0x128/0x138 [nfsd]
         [<cc88f0d4>] nfsd_dispatch+0xc0/0x178 [nfsd]
         [<c033ec1d>] svc_process+0x3a5/0x5ed
         [<cc88f5ba>] nfsd+0x1a7/0x305 [nfsd]
         [<c0101005>] kernel_thread_helper+0x5/0xb
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      12fd3520
  14. 01 7月, 2006 5 次提交
  15. 23 6月, 2006 1 次提交
  16. 22 5月, 2006 1 次提交
  17. 11 4月, 2006 1 次提交
    • N
      [PATCH] knfsd: nfsd4: fix acl xattr length return · b5872b0d
      NeilBrown 提交于
      We should be using the length from the second vfs_getxattr, in case it
      changed.  (Note: there's still a small race here; we could end up returning
      -ENOMEM if the length increased between the first and second call.  I don't
      know whether it's worth spending a lot of effort to fix that.)
      
      This makes XFS ACLs usable on NFS exports, which they currently aren't, since
      XFS appears to be returning a too-large value for vfs_getxattr() when it's
      passed a NULL buffer.  So there's probably an XFS bug here too, though since
      getxattr with a NULL buffer is usually used to decide how much memory to
      allocate, it may be a fairly harmless bug in most cases.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b5872b0d
  18. 29 3月, 2006 1 次提交
  19. 19 1月, 2006 1 次提交