1. 19 7月, 2011 4 次提交
  2. 29 6月, 2011 1 次提交
  3. 28 6月, 2011 2 次提交
  4. 27 6月, 2011 3 次提交
    • M
      btrfs: fix inconsonant inode information · 2f7e33d4
      Miao Xie 提交于
      When iputting the inode, We may leave the delayed nodes if they have some
      delayed items that have not been dealt with. So when the inode is read again,
      we must look up the relative delayed node, and use the information in it to
      initialize the inode. Or we will get inconsonant inode information, it may
      cause that the same directory index number is allocated again, and hit the
      following oops:
      
      [ 5447.554187] err add delayed dir index item(name: pglog_0.965_0) into the
      insertion tree of the delayed node(root id: 262, inode id: 258, errno: -17)
      [ 5447.569766] ------------[ cut here ]------------
      [ 5447.575361] kernel BUG at fs/btrfs/delayed-inode.c:1301!
      [SNIP]
      [ 5447.790721] Call Trace:
      [ 5447.793191]  [<ffffffffa0641c4e>] btrfs_insert_dir_item+0x189/0x1bb [btrfs]
      [ 5447.800156]  [<ffffffffa0651a45>] btrfs_add_link+0x12b/0x191 [btrfs]
      [ 5447.806517]  [<ffffffffa0651adc>] btrfs_add_nondir+0x31/0x58 [btrfs]
      [ 5447.812876]  [<ffffffffa0651d6a>] btrfs_create+0xf9/0x197 [btrfs]
      [ 5447.818961]  [<ffffffff8111f840>] vfs_create+0x72/0x92
      [ 5447.824090]  [<ffffffff8111fa8c>] do_last+0x22c/0x40b
      [ 5447.829133]  [<ffffffff8112076a>] path_openat+0xc0/0x2ef
      [ 5447.834438]  [<ffffffff810c58e2>] ? __perf_event_task_sched_out+0x24/0x44
      [ 5447.841216]  [<ffffffff8103ecdd>] ? perf_event_task_sched_out+0x59/0x67
      [ 5447.847846]  [<ffffffff81121a79>] do_filp_open+0x3d/0x87
      [ 5447.853156]  [<ffffffff811e126c>] ? strncpy_from_user+0x43/0x4d
      [ 5447.859072]  [<ffffffff8111f1f5>] ? getname_flags+0x2e/0x80
      [ 5447.864636]  [<ffffffff8111f179>] ? do_getname+0x14b/0x173
      [ 5447.870112]  [<ffffffff8111f1b7>] ? audit_getname+0x16/0x26
      [ 5447.875682]  [<ffffffff8112b1ab>] ? spin_lock+0xe/0x10
      [ 5447.880882]  [<ffffffff81112d39>] do_sys_open+0x69/0xae
      [ 5447.886153]  [<ffffffff81112db1>] sys_open+0x20/0x22
      [ 5447.891114]  [<ffffffff813b9aab>] system_call_fastpath+0x16/0x1b
      
      Fix it by reusing the old delayed node.
      Reported-by: NJim Schutt <jaschut@sandia.gov>
      Signed-off-by: NMiao Xie <miaox@cn.fujitsu.com>
      Tested-by: NJim Schutt <jaschut@sandia.gov>
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      2f7e33d4
    • R
      eCryptfs: added support for the encrypted key type · 1252cc3b
      Roberto Sassu 提交于
      The function ecryptfs_keyring_auth_tok_for_sig() has been modified in order
      to search keys of both 'user' and 'encrypted' types.
      Signed-off-by: NRoberto Sassu <roberto.sassu@polito.it>
      Acked-by: NGianluca Ramunno <ramunno@polito.it>
      Acked-by: NTyler Hicks <tyhicks@linux.vnet.ibm.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      1252cc3b
    • R
      eCryptfs: export global eCryptfs definitions to include/linux/ecryptfs.h · f8f85271
      Roberto Sassu 提交于
      Some eCryptfs specific definitions, such as the current version and the
      authentication token structure, are moved to the new include file
      'include/linux/ecryptfs.h', in order to be available for all kernel
      subsystems.
      Signed-off-by: NRoberto Sassu <roberto.sassu@polito.it>
      Acked-by: NGianluca Ramunno <ramunno@polito.it>
      Acked-by: NTyler Hicks <tyhicks@linux.vnet.ibm.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      f8f85271
  5. 25 6月, 2011 20 次提交
  6. 24 6月, 2011 5 次提交
    • J
      Remove unneeded version.h includes from fs/ · 46e4edbf
      Jesper Juhl 提交于
      It was pointed out by 'make versioncheck' that some includes of
      linux/version.h were not needed in fs/ (fs/btrfs/ctree.h and
      fs/omfs/file.c).
      
      This patch removes them.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Acked-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      46e4edbf
    • D
      xfs: prevent bogus assert when trying to remove non-existent attribute · 4a338212
      Dave Chinner 提交于
      If the attribute fork on an inode is in btree format and has
      multiple levels (i.e node format rather than leaf format), then a
      lookup failure will trigger an assert failure in xfs_da_path_shift
      if the flag XFS_DA_OP_OKNOENT is not set. This flag is used to
      indicate to the directory btree code that not finding an entry is
      not a fatal error. In the case of doing a lookup for a directory
      name removal, this is valid as a user cannot insert an arbitrary
      name to remove from the directory btree.
      
      However, in the case of the attribute tree, a user has direct
      control over the attribute name and can ask for any random name to
      be removed without any validation. In this case, fsstress is asking
      for a non-existent user.selinux attribute to be removed, and that is
      causing xfs_da_path_shift() to fall off the bottom of the tree where
      it asserts that a lookup failure is allowed. Because the flag is not
      set, we die a horrible death on a debug enable kernel.
      
      Prevent this assert from firing on attribute removes by adding the
      op_flag XFS_DA_OP_OKNOENT to atribute removal operations.
      
      Discovered when testing on a SELinux enabled system by fsstress in
      test 070 by trying to remove a non-existent user.selinux attribute.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      4a338212
    • D
      xfs: clear XFS_IDIRTY_RELEASE on truncate down · df4368a1
      Dave Chinner 提交于
      When an inode is truncated down, speculative preallocation is
      removed from the inode. This should also reset the state bits for
      controlling whether preallocation is subsequently removed when the
      file is next closed. The flag is not being cleared, so repeated
      operations on a file that first involve a truncate (e.g. multiple
      repeated dd invocations on a file) give different file layouts for
      the second and subsequent invocations.
      
      Fix this by clearing the XFS_IDIRTY_RELEASE state bit when the
      XFS_ITRUNCATED bit is detected in xfs_release() and hence ensure
      that speculative delalloc is removed on files that have been
      truncated down.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      df4368a1
    • D
      xfs: reset inode per-lifetime state when recycling it · 778e24bb
      Dave Chinner 提交于
      XFS inodes has several per-lifetime state fields that determine the
      behaviour of the inode. These state fields are not all reset when an
      inode is reused from the reclaimable state.
      
      This can lead to unexpected behaviour of the new inode such as
      speculative preallocation not being truncated away in the expected
      manner for local files until the inode is subsequently truncated,
      freed or cycles out of the cache. It can also lead to an inode being
      considered to be a filestream inode or having been truncated when
      that is not the case.
      
      Rework the reinitialisation of the inode when it is recycled to
      ensure that it is pristine before it is reused. While there, also
      fix the resetting of state flags in the recycling error paths so the
      inode does not become unreclaimable.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      778e24bb
    • J
      cifs: fix wsize negotiation to respect max buffer size and active signing (try #4) · 1190f6a0
      Jeff Layton 提交于
      Hopefully last version. Base signing check on CAP_UNIX instead of
      tcon->unix_ext, also clean up the comments a bit more.
      
      According to Hongwei Sun's blog posting here:
      
          http://blogs.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance-tuning.aspx
      
      CAP_LARGE_WRITEX is ignored when signing is active. Also, the maximum
      size for a write without CAP_LARGE_WRITEX should be the maxBuf that
      the server sent in the NEGOTIATE request.
      
      Fix the wsize negotiation to take this into account. While we're at it,
      alter the other wsize definitions to use sizeof(WRITE_REQ) to allow for
      slightly larger amounts of data to potentially be written per request.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      1190f6a0
  7. 23 6月, 2011 1 次提交
  8. 21 6月, 2011 4 次提交