1. 27 9月, 2010 1 次提交
  2. 24 9月, 2010 1 次提交
  3. 23 9月, 2010 2 次提交
    • S
      GFS2: Remove localcaching mount option · c2048b00
      Steven Whitehouse 提交于
      This option defaulted to on for lock_nolock mounts and off
      otherwise. The only function was to avoid the revalidation of
      dentries. In the cluster case, that is entirely pointless and
      liable to cause coherency problems.
      
      The patch changes the revalidation to depend upon whether the
      fs is a local or cluster fs (i.e. it follows the existing default
      behaviour). I very much doubt anybody ever used this option as
      there is no reason to. Even so we will continue to accept it
      on the mount command line, but ignore it.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      c2048b00
    • S
      GFS2: Remove ignore_local_fs mount argument · f57a024e
      Steven Whitehouse 提交于
      This is been a no-op for a very long time now. I'm pretty sure
      nobody uses it, but just in case we'll still accept it on the
      command line, but ignore it.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f57a024e
  4. 20 9月, 2010 11 次提交
    • S
      GFS2: Make . and .. qstrs constant · 8d123585
      Steven Whitehouse 提交于
      Rather than calculating the qstrs for . and .. each time
      we need them, its better to keep a constant version of
      these and just refer to them when required.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@infradead.org>
      8d123585
    • S
      GFS2: Use new workqueue scheme · 9fa0ea9f
      Steven Whitehouse 提交于
      The recovery workqueue can be freezable since
      we want it to finish what it is doing if the system is to
      be frozen (although why you'd want to freeze a cluster node
      is beyond me since it will result in it being ejected from
      the cluster). It does still make sense for single node
      GFS2 filesystems though.
      
      The glock workqueue will benefit from being able to run more
      work items concurrently. A test running postmark shows
      improved performance and multi-threaded workloads are likely
      to benefit even more. It needs to be high priority because
      the latency directly affects the latency of filesystem glock
      operations.
      
      The delete workqueue is similar to the recovery workqueue in
      that it must not get blocked by memory allocations, and may
      run for a long time.
      
      Potentially other GFS2 threads might also be converted to
      workqueues, but I'll leave that for a later patch.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      9fa0ea9f
    • S
      GFS2: Update handling of DLM return codes to match reality · 1fea7c25
      Steven Whitehouse 提交于
      GFS2's idea of which return codes it needs to handle was based
      upon those listed in dlm.h. Those didn't cover all the possible
      codes and listed some which never happen. This updates GFS2 to
      handle all the codes which can actually be returned from the
      DLM under various circumstances.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      1fea7c25
    • S
      GFS2: Don't enforce min hold time when two demotes occur in rapid succession · 7b5e3d5f
      Steven Whitehouse 提交于
      Due to the design of the VFS, it is quite usual for operations on GFS2
      to consist of a lookup (requiring a shared lock) followed by an
      operation requiring an exclusive lock. If a remote node has cached an
      exclusive lock, then it will receive two demote events in rapid succession
      firstly for a shared lock and then to unlocked. The existing min hold time
      code was triggering in this case, even if the node was otherwise idle
      since the state change time was being updated by the initial demote.
      
      This patch introduces logic to skip the min hold timer in the case that
      a "double demote" of this kind has occurred. The min hold timer will
      still be used in all other cases.
      
      A new glock flag is introduced which is used to keep track of whether
      there have been any newly queued holders since the last glock state
      change. The min hold time is only applied if the flag is set.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Tested-by: NAbhijith Das <adas@redhat.com>
      7b5e3d5f
    • S
      GFS2: Fix whitespace in previous patch · fe08d5a8
      Steven Whitehouse 提交于
      Removes the offending space
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      fe08d5a8
    • B
      GFS2: fallocate support · 3921120e
      Benjamin Marzinski 提交于
      This patch adds support for fallocate to gfs2.  Since the gfs2 does not support
      uninitialized data blocks, it must write out zeros to all the blocks.  However,
      since it does not need to lock any pages to read from, gfs2 can write out the
      zero blocks much more efficiently.  On a moderately full filesystem, fallocate
      works around 5 times faster on average.  The fallocate call also allows gfs2 to
      add blocks to the file without changing the filesize, which will make it
      possible for gfs2 to preallocate space for the rindex file, so that gfs2 can
      grow a completely full filesystem.
      Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      3921120e
    • S
      GFS2: Add a bug trap in allocation code · 9a3f236d
      Steven Whitehouse 提交于
      This adds a check to ensure that if we reach the block allocator
      that we don't try and proceed if there is no alloc structure
      hanging off the inode. This should only happen if there is a bug
      in GFS2. The error return code is distinctive in order that it
      will be easily spotted.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      9a3f236d
    • S
      GFS2: No longer experimental · 820969f3
      Steven Whitehouse 提交于
      I think the time has arrvied to remove the experimental tag
      from GFS2.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      820969f3
    • S
      GFS2: Remove i_disksize · a2e0f799
      Steven Whitehouse 提交于
      With the update of the truncate code, ip->i_disksize and
      inode->i_size are merely copies of each other. This means
      we can remove ip->i_disksize and use inode->i_size exclusively
      reducing the size of a GFS2 inode by 8 bytes.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      a2e0f799
    • S
      GFS2: New truncate sequence · ff8f33c8
      Steven Whitehouse 提交于
      This updates GFS2's truncate code to use the new truncate
      sequence correctly. This is a stepping stone to being
      able to remove ip->i_disksize in favour of using i_size
      everywhere now that the two sizes are always identical.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Christoph Hellwig <hch@lst.de>
      ff8f33c8
    • J
      Coda: mount hangs because of missed REQ_WRITE rename · 112d421d
      Jan Harkes 提交于
      Coda's REQ_* defines were renamed to avoid clashes with the block layer
      (commit 4aeefdc6: "coda: fixup clash with block layer REQ_*
      defines").
      
      However one was missed and response messages are no longer matched with
      requests and waiting threads are no longer woken up.  This patch fixes
      this.
      Signed-off-by: NJan Harkes <jaharkes@cs.cmu.edu>
      [ Also fixed up whitespace while at it  -Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      112d421d
  5. 17 9月, 2010 1 次提交
  6. 15 9月, 2010 2 次提交
    • J
      aio: check for multiplication overflow in do_io_submit · 75e1c70f
      Jeff Moyer 提交于
      Tavis Ormandy pointed out that do_io_submit does not do proper bounds
      checking on the passed-in iocb array:
      
             if (unlikely(nr < 0))
                     return -EINVAL;
      
             if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))
                     return -EFAULT;                      ^^^^^^^^^^^^^^^^^^
      
      The attached patch checks for overflow, and if it is detected, the
      number of iocbs submitted is scaled down to a number that will fit in
      the long.  This is an ok thing to do, as sys_io_submit is documented as
      returning the number of iocbs submitted, so callers should handle a
      return value of less than the 'nr' argument passed in.
      Reported-by: NTavis Ormandy <taviso@cmpxchg8b.com>
      Signed-off-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      75e1c70f
    • J
      cifs: fix potential double put of TCP session reference · 460cf341
      Jeff Layton 提交于
      cifs_get_smb_ses must be called on a server pointer on which it holds an
      active reference. It first does a search for an existing SMB session. If
      it finds one, it'll put the server reference and then try to ensure that
      the negprot is done, etc.
      
      If it encounters an error at that point then it'll return an error.
      There's a potential problem here though. When cifs_get_smb_ses returns
      an error, the caller will also put the TCP server reference leading to a
      double-put.
      
      Fix this by having cifs_get_smb_ses only put the server reference if
      it found an existing session that it could use and isn't returning an
      error.
      
      Cc: stable@kernel.org
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      460cf341
  7. 13 9月, 2010 9 次提交
  8. 10 9月, 2010 11 次提交
  9. 09 9月, 2010 2 次提交
    • J
      cifs: prevent possible memory corruption in cifs_demultiplex_thread · 32670396
      Jeff Layton 提交于
      cifs_demultiplex_thread sets the addr.sockAddr.sin_port without any
      regard for the socket family. While it may be that the error in question
      here never occurs on an IPv6 socket, it's probably best to be safe and
      set the port properly if it ever does.
      
      Break the port setting code out of cifs_fill_sockaddr and into a new
      function, and call that from cifs_demultiplex_thread.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      32670396
    • J
      cifs: eliminate some more premature cifsd exits · 7332f2a6
      Jeff Layton 提交于
      If the tcpStatus is still CifsNew, the main cifs_demultiplex_loop can
      break out prematurely in some cases. This is wrong as we will almost
      always have other structures with pointers to the TCP_Server_Info. If
      the main loop breaks under any other condition other than tcpStatus ==
      CifsExiting, then it'll face a use-after-free situation.
      
      I don't see any reason to treat a CifsNew tcpStatus differently than
      CifsGood. I believe we'll still want to attempt to reconnect in either
      case. What should happen in those situations is that the MIDs get marked
      as MID_RETRY_NEEDED. This will make CIFSSMBNegotiate return -EAGAIN, and
      then the caller can retry the whole thing on a newly reconnected socket.
      If that fails again in the same way, the caller of cifs_get_smb_ses
      should tear down the TCP_Server_Info struct.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      7332f2a6