1. 08 5月, 2016 17 次提交
  2. 04 5月, 2016 3 次提交
  3. 28 4月, 2016 3 次提交
  4. 27 4月, 2016 6 次提交
  5. 15 4月, 2016 11 次提交
    • J
      f2fs: flush dirty pages before starting atomic writes · c27753d6
      Jaegeuk Kim 提交于
      If somebody wrote some data before atomic writes, we should flush them in order
      to handle atomic data in a right period.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      c27753d6
    • J
      f2fs: don't invalidate atomic page if successful · 63c52d78
      Jaegeuk Kim 提交于
      If we committed atomic write successfully, we don't need to invalidate pages.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      63c52d78
    • J
      f2fs: give -E2BIG for no space in xattr · 58457f1c
      Jaegeuk Kim 提交于
      This patch returns -E2BIG if there is no space to add an xattr entry.
      This should fix generic/026 in xfstests as well.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      58457f1c
    • J
      f2fs: remove redundant condition check · 4da7bf5a
      Jaegeuk Kim 提交于
      This patch resolves the redundant condition check reported by David.
      Reported-by: NDavid Binderman <dcb314@hotmail.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      4da7bf5a
    • J
      f2fs: unset atomic/volatile flag in f2fs_release_file · 26dc3d44
      Jaegeuk Kim 提交于
      The atomic/volatile operation should be done in pair of start and commit
      ioctl.
      For example, if a killed process remains open-ended atomic operation, we should
      drop its flag as well as its atomic data. Otherwise, if sqlite initiates another
      operation which doesn't require atomic writes, it will lose every data, since
      f2fs still treats with them as atomic writes; nobody will trigger its commit.
      Reported-by: NMiao Xie <miaoxie@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      26dc3d44
    • J
      f2fs: fix dropping inmemory pages in a wrong time · de5307e4
      Jaegeuk Kim 提交于
      When one reader closes its file while the other writer is doing atomic writes,
      f2fs_release_file drops atomic data resulting in an empty commit.
      This patch fixes this wrong commit problem by checking openess of the file.
      
       Process0                       Process1
       				open file
       start atomic write
       write data
       read data
      				close file
      				f2fs_release_file()
      				clear atomic data
       commit atomic write
      Reported-by: NMiao Xie <miaoxie@huawei.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      de5307e4
    • J
      f2fs: add BUG_ON to avoid unnecessary flow · ff373558
      Jaegeuk Kim 提交于
      This patch adds BUG_ON instead of retrying loop.
      In the case of node pages, we already got this inode page, but unlocked it.
      By the fact that we don't truncate any node pages in operations, the page's
      mapping should be unchangeable.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      ff373558
    • J
      f2fs: use PGP_LOCK to check its truncation · 4a6de50d
      Jaegeuk Kim 提交于
      Previously, after trylock_page is succeeded, it doesn't check its mapping.
      In order to fix that, we can just give PGP_LOCK to pagecache_get_page.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      4a6de50d
    • C
      f2fs: fix to convert inline directory correctly · 675f10bd
      Chao Yu 提交于
      With below serials, we will lose parts of dirents:
      
      1) mount f2fs with inline_dentry option
      2) echo 1 > /sys/fs/f2fs/sdX/dir_level
      3) mkdir dir
      4) touch 180 files named [1-180] in dir
      5) touch 181 in dir
      6) echo 3 > /proc/sys/vm/drop_caches
      7) ll dir
      
      ls: cannot access 2: No such file or directory
      ls: cannot access 4: No such file or directory
      ls: cannot access 5: No such file or directory
      ls: cannot access 6: No such file or directory
      ls: cannot access 8: No such file or directory
      ls: cannot access 9: No such file or directory
      ...
      total 360
      drwxr-xr-x 2 root root 4096 Feb 19 15:12 ./
      drwxr-xr-x 3 root root 4096 Feb 19 15:11 ../
      -rw-r--r-- 1 root root    0 Feb 19 15:12 1
      -rw-r--r-- 1 root root    0 Feb 19 15:12 10
      -rw-r--r-- 1 root root    0 Feb 19 15:12 100
      -????????? ? ?    ?       ?            ? 101
      -????????? ? ?    ?       ?            ? 102
      -????????? ? ?    ?       ?            ? 103
      ...
      
      The reason is: when doing the inline dir conversion, we didn't consider
      that directory has hierarchical hash structure which can be configured
      through sysfs interface 'dir_level'.
      
      By default, dir_level of directory inode is 0, it means we have one bucket
      in hash table located in first level, all dirents will be hashed in this
      bucket, so it has no problem for us to do the duplication simply between
      inline dentry page and converted normal dentry page.
      
      However, if we configured dir_level with the value N (greater than 0), it
      will expand the bucket number of first level hash table by 2^N - 1, it
      hashs dirents into different buckets according their hash value, if we
      still move all dirents to first bucket, it makes incorrent locating for
      inline dirents, the result is, although we can iterate all dirents through
      ->readdir, we can't stat some of them in ->lookup which based on hash
      table searching.
      
      This patch fixes this issue by rehashing dirents into correct position
      when converting inline directory.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      675f10bd
    • J
      f2fs: show current mount status · 8c11a53f
      Jaegeuk Kim 提交于
      This patch remains the current mount status to f2fs status info.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      8c11a53f
    • J
      f2fs: treat as a normal umount when remounting ro · faa0e55b
      Jaegeuk Kim 提交于
      When user remounts f2fs as read-only, we can mark the checkpoint as umount.
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      faa0e55b