Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7d7b986 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull f2fs updates from Jaegeuk Kim:
 "Major changes are to:
   - add f2fs_io_tracer and F2FS_IOC_GETVERSION
   - fix wrong acl assignment from parent
   - fix accessing wrong data blocks
   - fix wrong condition check for f2fs_sync_fs
   - align start block address for direct_io
   - add and refactor the readahead flows of FS metadata
   - refactor atomic and volatile write policies

  But most of patches are for clean-ups and minor bug fixes.  Some of
  them refactor old code too"

* tag 'for-f2fs-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (64 commits)
  f2fs: use spinlock for segmap_lock instead of rwlock
  f2fs: fix accessing wrong indexed data blocks
  f2fs: avoid variable length array
  f2fs: fix sparse warnings
  f2fs: allocate data blocks in advance for f2fs_direct_IO
  f2fs: introduce macros to convert bytes and blocks in f2fs
  f2fs: call set_buffer_new for get_block
  f2fs: check node page contents all the time
  f2fs: avoid data offset overflow when lseeking huge file
  f2fs: fix to use highmem for pages of newly created directory
  f2fs: introduce a batched trim
  f2fs: merge {invalidate,release}page for meta/node/data pages
  f2fs: show the number of writeback pages in stat
  f2fs: keep PagePrivate during releasepage
  f2fs: should fail mount when trying to recover data on read-only dev
  f2fs: split UMOUNT and FASTBOOT flags
  f2fs: avoid write_checkpoint if f2fs is mounted readonly
  f2fs: support norecovery mount option
  f2fs: fix not to drop mount options when retrying fill_super
  f2fs: merge flags in struct f2fs_sb_info
  ...
parents 81809957 1a118ccf
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -74,3 +74,9 @@ Date: March 2014
Contact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
Description:
		 Controls the memory footprint used by f2fs.

What:		/sys/fs/f2fs/<disk>/trim_sections
Date:		February 2015
Contact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
Description:
		 Controls the trimming rate in batch mode.
+6 −0
Original line number Diff line number Diff line
@@ -106,6 +106,8 @@ background_gc=%s Turn on/off cleaning operations, namely garbage
                       Default value for this option is on. So garbage
                       collection is on by default.
disable_roll_forward   Disable the roll-forward recovery routine
norecovery             Disable the roll-forward recovery routine, mounted read-
                       only (i.e., -o ro,disable_roll_forward)
discard                Issue discard/TRIM commands when a segment is cleaned.
no_heap                Disable heap-style segment allocation which finds free
                       segments for data from the beginning of main area, while
@@ -197,6 +199,10 @@ Files in /sys/fs/f2fs/<devname>
			      checkpoint is triggered, and issued during the
			      checkpoint. By default, it is disabled with 0.

 trim_sections                This parameter controls the number of sections
                              to be trimmed out in batch mode when FITRIM
                              conducts. 32 sections is set by default.

 ipu_policy                   This parameter controls the policy of in-place
                              updates in f2fs. There are five policies:
                               0x01: F2FS_IPU_FORCE, 0x02: F2FS_IPU_SSR,
+10 −0
Original line number Diff line number Diff line
@@ -71,3 +71,13 @@ config F2FS_CHECK_FS
	  Enables BUG_ONs which check the filesystem consistency in runtime.

	  If you want to improve the performance, say N.

config F2FS_IO_TRACE
	bool "F2FS IO tracer"
	depends on F2FS_FS
	depends on FUNCTION_TRACER
	help
	  F2FS IO trace is based on a function trace, which gathers process
	  information and block IO patterns in the filesystem level.

	  If unsure, say N.
+1 −0
Original line number Diff line number Diff line
@@ -5,3 +5,4 @@ f2fs-y += checkpoint.o gc.o data.o node.o segment.o recovery.o
f2fs-$(CONFIG_F2FS_STAT_FS) += debug.o
f2fs-$(CONFIG_F2FS_FS_XATTR) += xattr.o
f2fs-$(CONFIG_F2FS_FS_POSIX_ACL) += acl.o
f2fs-$(CONFIG_F2FS_IO_TRACE) += trace.o
+3 −3
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ static struct posix_acl *f2fs_acl_from_disk(const char *value, size_t size)
	if (count == 0)
		return NULL;

	acl = posix_acl_alloc(count, GFP_KERNEL);
	acl = posix_acl_alloc(count, GFP_NOFS);
	if (!acl)
		return ERR_PTR(-ENOMEM);

@@ -116,7 +116,7 @@ static void *f2fs_acl_to_disk(const struct posix_acl *acl, size_t *size)
	int i;

	f2fs_acl = kmalloc(sizeof(struct f2fs_acl_header) + acl->a_count *
			sizeof(struct f2fs_acl_entry), GFP_KERNEL);
			sizeof(struct f2fs_acl_entry), GFP_NOFS);
	if (!f2fs_acl)
		return ERR_PTR(-ENOMEM);

@@ -396,7 +396,7 @@ int f2fs_init_acl(struct inode *inode, struct inode *dir, struct page *ipage,
		posix_acl_release(default_acl);
	}
	if (acl) {
		if (error)
		if (!error)
			error = __f2fs_set_acl(inode, ACL_TYPE_ACCESS, acl,
					       ipage);
		posix_acl_release(acl);
Loading