1. 01 10月, 2014 2 次提交
  2. 24 9月, 2014 2 次提交
    • C
      f2fs: fix to clean previous mount option when remount_fs · 26666c8a
      Chao Yu 提交于
      In manual of mount, we descript remount as below:
      
      "mount -o remount,rw /dev/foo /dir
      After  this call all old mount options are replaced and arbitrary stuff from
      fstab is ignored, except the loop= option which is internally generated and
      maintained by the mount command."
      
      Previously f2fs do not clear up old mount options when remount_fs, so we have no
      chance of disabling previous option (e.g. flush_merge). Fix it.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      26666c8a
    • C
      f2fs: support large sector size · 55cf9cb6
      Chao Yu 提交于
      Block size in f2fs is 4096 bytes, so theoretically, f2fs can support 4096 bytes
      sector device at maximum. But now f2fs only support 512 bytes size sector, so
      block device such as zRAM which uses page cache as its block storage space will
      not be mounted successfully as mismatch between sector size of zRAM and sector
      size of f2fs supported.
      
      In this patch we support large sector size in f2fs, so block device with sector
      size of 512/1024/2048/4096 bytes can be supported in f2fs.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
      55cf9cb6
  3. 16 9月, 2014 2 次提交
  4. 10 9月, 2014 2 次提交
  5. 29 8月, 2014 1 次提交
  6. 22 8月, 2014 6 次提交
  7. 20 8月, 2014 2 次提交
  8. 31 7月, 2014 1 次提交
  9. 29 7月, 2014 2 次提交
  10. 25 7月, 2014 1 次提交
  11. 10 7月, 2014 1 次提交
  12. 09 7月, 2014 1 次提交
  13. 07 5月, 2014 4 次提交
  14. 07 4月, 2014 1 次提交
    • J
      f2fs: introduce f2fs_issue_flush to avoid redundant flush issue · 6b4afdd7
      Jaegeuk Kim 提交于
      Some storage devices show relatively high latencies to complete cache_flush
      commands, even though their normal IO speed is prettry much high. In such
      the case, it needs to merge cache_flush commands as much as possible to avoid
      issuing them redundantly.
      So, this patch introduces a mount option, "-o flush_merge", to mitigate such
      the overhead.
      
      If this option is enabled by user, F2FS merges the cache_flush commands and then
      issues just one cache_flush on behalf of them. Once the single command is
      finished, F2FS sends a completion signal to all the pending threads.
      
      Note that, this option can be used under a workload consisting of very intensive
      concurrent fsync calls, while the storage handles cache_flush commands slowly.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      6b4afdd7
  15. 01 4月, 2014 1 次提交
  16. 20 3月, 2014 2 次提交
    • J
      f2fs: introduce fi->i_sem to protect fi's info · d928bfbf
      Jaegeuk Kim 提交于
      This patch introduces fi->i_sem to protect fi's info that includes xattr_ver,
      pino, i_nlink.
      This enables to remove i_mutex during f2fs_sync_file, resulting in performance
      improvement when a number of fsync calls are triggered from many concurrent
      threads.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      d928bfbf
    • J
      f2fs: throttle the memory footprint with a sysfs entry · cdfc41c1
      Jaegeuk Kim 提交于
      This patch introduces ram_thresh, a sysfs entry, which controls the memory
      footprint used by the free nid list and the nat cache.
      
      Previously, the free nid list was controlled by MAX_FREE_NIDS, while the nat
      cache was managed by NM_WOUT_THRESHOLD.
      However, this approach cannot be applied dynamically according to the system.
      
      So, this patch adds ram_thresh that users can specify the threshold, which is
      in order of 1 / 1024.
      For example, if the total ram size is 4GB and the value is set to 10 by default,
      f2fs tries to control the number of free nids and nat caches not to consume over
      10 * (4GB / 1024) = 10MB.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      cdfc41c1
  17. 18 3月, 2014 2 次提交
    • C
      f2fs: fix incorrect parsing with option string · 04c09388
      Chao Yu 提交于
      Previously 'background_gc={on***,off***}' is being parsed as correct option,
      with this patch we cloud fix the trivial bug in mount process.
      
      Change log from v1:
       o need to check length of parameter suggested by Jaegeuk Kim.
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      04c09388
    • C
      f2fs: print type for each segment in segment_info's show · 90aa6dc9
      Chao Yu 提交于
      The original segment_info's show looks out-of-format:
      cat /proc/fs/f2fs/loop0/segment_info
      0 0 0 0 0 0 0 0 0 0
      0 0 0 0 0 0 0 0 0 0
      0 0 0 0 0 0 0 0 0 0
      0 0 0 0 0 0 0 0 0 0
      0 0 0 0 0 0 0 0 0 0
      0 0 0 0 0 0 0 0 0 0
      0 0 0 0 0 0 0 0 0 512
      512 512 512 512 512 512 512 0 0 512
      348 0 263 0 0 512 0 0 512 512
      512 512 0 512 512 512 512 512 512 512
      512 512 511 328 512 512 512 512 512 512
      512 512 512 512 512 512 512 0 0 175
      
      Let's fix this and show type for each segment.
      cat /proc/fs/f2fs/loop0/segment_info
      format: segment_type|valid_blocks
      segment_type(0:HD, 1:WD, 2:CD, 3:HN, 4:WN, 5:CN)
      0    2|0   1|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0
      10   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0
      20   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0
      30   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0
      40   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0   0|0
      50   3|0   3|0   3|0   3|0   3|0   3|0   3|0   0|0   3|0   3|0
      60   3|0   3|0   3|0   3|0   3|0   3|0   3|0   3|0   3|0   3|512
      70   3|512 3|512 3|512 3|512 3|512 3|512 3|512 3|0   3|0   3|512
      80   3|0   3|0   3|0   3|0   3|0   3|512 3|0   3|0   3|512 3|512
      90   3|512 0|512 3|274 0|512 0|512 0|512 0|512 0|512 0|512 3|512
      100  3|512 0|512 3|511 0|328 3|512 0|512 0|512 3|512 0|512 0|512
      110  0|512 0|512 0|512 0|512 0|512 0|512 0|512 5|0   4|0   3|512
      Signed-off-by: NChao Yu <chao2.yu@samsung.com>
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      90aa6dc9
  18. 13 3月, 2014 1 次提交
    • T
      fs: push sync_filesystem() down to the file system's remount_fs() · 02b9984d
      Theodore Ts'o 提交于
      Previously, the no-op "mount -o mount /dev/xxx" operation when the
      file system is already mounted read-write causes an implied,
      unconditional syncfs().  This seems pretty stupid, and it's certainly
      documented or guaraunteed to do this, nor is it particularly useful,
      except in the case where the file system was mounted rw and is getting
      remounted read-only.
      
      However, it's possible that there might be some file systems that are
      actually depending on this behavior.  In most file systems, it's
      probably fine to only call sync_filesystem() when transitioning from
      read-write to read-only, and there are some file systems where this is
      not needed at all (for example, for a pseudo-filesystem or something
      like romfs).
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: linux-fsdevel@vger.kernel.org
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Artem Bityutskiy <dedekind1@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Evgeniy Dushistov <dushistov@mail.ru>
      Cc: Jan Kara <jack@suse.cz>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Anders Larsen <al@alarsen.net>
      Cc: Phillip Lougher <phillip@squashfs.org.uk>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
      Cc: Petr Vandrovec <petr@vandrovec.name>
      Cc: xfs@oss.sgi.com
      Cc: linux-btrfs@vger.kernel.org
      Cc: linux-cifs@vger.kernel.org
      Cc: samba-technical@lists.samba.org
      Cc: codalist@coda.cs.cmu.edu
      Cc: linux-ext4@vger.kernel.org
      Cc: linux-f2fs-devel@lists.sourceforge.net
      Cc: fuse-devel@lists.sourceforge.net
      Cc: cluster-devel@redhat.com
      Cc: linux-mtd@lists.infradead.org
      Cc: jfs-discussion@lists.sourceforge.net
      Cc: linux-nfs@vger.kernel.org
      Cc: linux-nilfs@vger.kernel.org
      Cc: linux-ntfs-dev@lists.sourceforge.net
      Cc: ocfs2-devel@oss.oracle.com
      Cc: reiserfs-devel@vger.kernel.org
      02b9984d
  19. 12 3月, 2014 1 次提交
  20. 10 3月, 2014 2 次提交
  21. 27 2月, 2014 1 次提交
    • J
      f2fs: add an sysfs entry to control the directory level · ab9fa662
      Jaegeuk Kim 提交于
      This patch adds an sysfs entry to control dir_level used by the large directory.
      
      The description of this entry is:
      
       dir_level                    This parameter controls the directory level to
      			      support large directory. If a directory has a
      			      number of files, it can reduce the file lookup
      			      latency by increasing this dir_level value.
      			      Otherwise, it needs to decrease this value to
      			      reduce the space overhead. The default value is 0.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      ab9fa662
  22. 24 2月, 2014 1 次提交
    • J
      f2fs: fix to do build_stat prior to the recovery procedure · 6437d1b0
      Jaegeuk Kim 提交于
      At the end of the recovery procedure, write_checkpoint is called and updates
      the cp count which is managed by f2fs stat.
      But, previously build_stat() is called after the recovery procedure, which
      results in:
      
      BUG: unable to handle kernel NULL pointer dereference at 000000000000012c
      IP: [<ffffffffa03b1030>] write_checkpoint+0x720/0xbc0 [f2fs]
      Call Trace:
       [<ffffffff810a6b44>] ? mark_held_locks+0x74/0x140
       [<ffffffff8109a3e0>] ? __init_waitqueue_head+0x60/0x60
       [<ffffffffa03bf036>] recover_fsync_data+0x656/0xf20 [f2fs]
       [<ffffffff812ee3eb>] ? security_d_instantiate+0x1b/0x30
       [<ffffffffa03aeb4d>] f2fs_fill_super+0x94d/0xa00 [f2fs]
       [<ffffffff811a9825>] mount_bdev+0x1a5/0x1f0
       [<ffffffff8114915e>] ? __get_free_pages+0xe/0x40
       [<ffffffffa03ae200>] ? f2fs_remount+0x130/0x130 [f2fs]
       [<ffffffffa03aa575>] f2fs_mount+0x15/0x20 [f2fs]
       [<ffffffff811aa713>] mount_fs+0x43/0x1b0
       [<ffffffff811c7124>] vfs_kern_mount+0x74/0x160
       [<ffffffff811c5cb1>] ? __get_fs_type+0x51/0x60
       [<ffffffff811c9727>] do_mount+0x237/0xb50
       [<ffffffff811c936a>] ? copy_mount_options+0x3a/0x170
      
      So, this patche changes the order of recovery_fsync_data() and
      f2fs_build_stats().
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      6437d1b0
  23. 20 1月, 2014 1 次提交