1. 18 6月, 2017 1 次提交
  2. 15 6月, 2017 8 次提交
    • A
      ufs_truncate_blocks(): fix the case when size is in the last direct block · a8fad984
      Al Viro 提交于
      The logics when deciding whether we need to do anything with direct blocks
      is broken when new size is within the last direct block.  It's better to
      find the path to the last byte _not_ to be removed and use that instead
      of the path to the beginning of the first block to be freed...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a8fad984
    • A
      ufs: more deadlock prevention on tail unpacking · 289dec5b
      Al Viro 提交于
      ->s_lock is not needed for ufs_change_blocknr()
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      289dec5b
    • A
      ufs: avoid grabbing ->truncate_mutex if possible · 09bf4f5b
      Al Viro 提交于
      tail unpacking is done in a wrong place; the deadlocks galore
      is best dealt with by doing that in ->write_iter() (and switching
      to iomap, while we are at it), but that's rather painful to
      backport.  The trouble comes from grabbing pages that cover
      the beginning of tail from inside of ufs_new_fragments(); ongoing
      pageout of any of those is going to deadlock on ->truncate_mutex
      with process that got around to extending the tail holding that
      and waiting for page to get unlocked, while ->writepage() on
      that page is waiting on ->truncate_mutex.
      
      The thing is, we don't need ->truncate_mutex when the fragment
      we are trying to map is within the tail - the damn thing is
      allocated (tail can't contain holes).
      
      Let's do a plain lookup and if the fragment is present, we can
      just pretend that we'd won the race in almost all cases.  The
      only exception is a fragment between the end of tail and the
      end of block containing tail.
      
      Protect ->i_lastfrag with ->meta_lock - read_seqlock_excl() is
      sufficient.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      09bf4f5b
    • A
      ufs_get_locked_page(): make sure we have buffer_heads · 267309f3
      Al Viro 提交于
      callers rely upon that, but find_lock_page() racing with attempt of
      page eviction by memory pressure might have left us with
      	* try_to_free_buffers() successfully done
      	* __remove_mapping() failed, leaving the page in our mapping
      	* find_lock_page() returning an uptodate page with no
      buffer_heads attached.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      267309f3
    • A
      ufs: fix s_size/s_dsize users · c596961d
      Al Viro 提交于
      For UFS2 we need 64bit variants; we even store them in uspi, but
      use 32bit ones instead.  One wrinkle is in handling of reserved
      space - recalculating it every time had been stupid all along, but
      now it would become really ugly.  Just calculate it once...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c596961d
    • A
      ufs: fix reserved blocks check · b451cec4
      Al Viro 提交于
      a) honour ->s_minfree; don't just go with default (5)
      b) don't bother with capability checks until we know we'll need them
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b451cec4
    • A
      ufs: make ufs_freespace() return signed · fffd70f5
      Al Viro 提交于
      as it is, checking that its return value is <= 0 is useless and
      that's how it's being used.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      fffd70f5
    • A
      ufs: fix logics in "ufs: make fsck -f happy" · 96ecff14
      Al Viro 提交于
      Storing stats _only_ at new locations is wrong for UFS1; old
      locations should always be kept updated.  The check for "has
      been converted to use of new locations" is also wrong - it
      should be "->fs_maxbsize is equal to ->fs_bsize".
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      96ecff14
  3. 11 6月, 2017 1 次提交
  4. 10 6月, 2017 7 次提交
  5. 13 5月, 2017 6 次提交
  6. 11 5月, 2017 3 次提交
  7. 10 5月, 2017 3 次提交
  8. 09 5月, 2017 11 次提交