1. 20 3月, 2010 1 次提交
    • T
      ocfs2: Fix the update of name_offset when removing xattrs · dfe4d3d6
      Tao Ma 提交于
      When replacing a xattr's value, in some case we wipe its name/value
      first and then re-add it. The wipe is done by
      ocfs2_xa_block_wipe_namevalue() when the xattr is in the inode or
      block. We currently adjust name_offset for all the entries which have
      (offset < name_offset). This does not adjust the entrie we're replacing.
      Since we are replacing the entry, we don't adjust the total entry count.
      When we calculate a new namevalue location, we trust the entries
      now-wrong offset in ocfs2_xa_get_free_start().  The solution is to
      also adjust the name_offset for the replaced entry, allowing
      ocfs2_xa_get_free_start() to calculate the new namevalue location
      correctly.
      
      The following script can trigger a kernel panic easily.
      
      echo 'y'|mkfs.ocfs2 --fs-features=local,xattr -b 4K $DEVICE
      mount -t ocfs2 $DEVICE $MNT_DIR
      FILE=$MNT_DIR/$RANDOM
      for((i=0;i<76;i++))
      do
      string_76="a$string_76"
      done
      string_78="aa$string_76"
      string_82="aaaa$string_78"
      
      touch $FILE
      setfattr -n 'user.test1234567890' -v $string_76 $FILE
      setfattr -n 'user.test1234567890' -v $string_78 $FILE
      setfattr -n 'user.test1234567890' -v $string_82 $FILE
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      dfe4d3d6
  2. 19 3月, 2010 1 次提交
    • M
      ocfs2: Always try for maximum bits with new local alloc windows · b22b63eb
      Mark Fasheh 提交于
      What we were doing before was to ask for the current window size as the
      maximum allocation. This had the effect of limiting the amount of allocation
      we could get for the local alloc during times when the window size was
      shrunk due to fragmentation. In some cases, that could actually *increase*
      fragmentation by artificially limiting the number of bits we can accept. So
      while we still want to ask for a minimum number of bits equal to window
      size, there is no reason why we should limit the number of bits the local
      alloc should accept. Hence always allow the maximum number of local alloc
      bits.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      b22b63eb
  3. 18 3月, 2010 4 次提交
  4. 15 3月, 2010 31 次提交
  5. 14 3月, 2010 3 次提交