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

Commit 63da4200 authored by Hyojun Kim's avatar Hyojun Kim Committed by Greg Kroah-Hartman
Browse files

f2fs: catch up to v4.14-rc1



Cherry-picked from upstream-f2fs-stable-linux-4.9.y

Changes include:

commit 30da3a4d ("f2fs: hurry up to issue discard after io interruption")
commit d1c363b4 ("f2fs: fix to show correct discard_granularity in sysfs")
...

commit e6b120d4 ("f2fs/fscrypt: catch up to v4.12")
commit 4d7931d7 ("KEYS: Differentiate uses of rcu_dereference_key() and user_key_payload()")

Signed-off-by: default avatarHyojun Kim <hyojun@google.com>
parent 05c85a6d
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -57,6 +57,15 @@ Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
Description:
		 Controls the issue rate of small discard commands.

What:          /sys/fs/f2fs/<disk>/discard_granularity
Date:          July 2017
Contact:       "Chao Yu" <yuchao0@huawei.com>
Description:
		Controls discard granularity of inner discard thread, inner thread
		will not issue discards with size that is smaller than granularity.
		The unit size is one block, now only support configuring in range
		of [1, 512].

What:		/sys/fs/f2fs/<disk>/max_victim_search
Date:		January 2014
Contact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
@@ -112,3 +121,33 @@ Date: January 2016
Contact:	"Shuoran Liu" <liushuoran@huawei.com>
Description:
		 Shows total written kbytes issued to disk.

What:		/sys/fs/f2fs/<disk>/inject_rate
Date:		May 2016
Contact:	"Sheng Yong" <shengyong1@huawei.com>
Description:
		 Controls the injection rate.

What:		/sys/fs/f2fs/<disk>/inject_type
Date:		May 2016
Contact:	"Sheng Yong" <shengyong1@huawei.com>
Description:
		 Controls the injection type.

What:		/sys/fs/f2fs/<disk>/reserved_blocks
Date:		June 2017
Contact:	"Chao Yu" <yuchao0@huawei.com>
Description:
		 Controls current reserved blocks in system.

What:		/sys/fs/f2fs/<disk>/gc_urgent
Date:		August 2017
Contact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
Description:
		 Do background GC agressively

What:		/sys/fs/f2fs/<disk>/gc_urgent_sleep_time
Date:		August 2017
Contact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
Description:
		 Controls sleep time of GC urgent mode
+23 −0
Original line number Diff line number Diff line
@@ -157,6 +157,20 @@ data_flush Enable data flushing before checkpoint in order to
mode=%s                Control block allocation mode which supports "adaptive"
                       and "lfs". In "lfs" mode, there should be no random
                       writes towards main area.
io_bits=%u             Set the bit size of write IO requests. It should be set
                       with "mode=lfs".
usrquota               Enable plain user disk quota accounting.
grpquota               Enable plain group disk quota accounting.
prjquota               Enable plain project quota accounting.
usrjquota=<file>       Appoint specified file and type during mount, so that quota
grpjquota=<file>       information can be properly updated during recovery flow,
prjjquota=<file>       <quota file>: must be in root directory;
jqfmt=<quota type>     <quota type>: [vfsold,vfsv0,vfsv1].
offusrjquota           Turn off user journelled quota.
offgrpjquota           Turn off group journelled quota.
offprjjquota           Turn off project journelled quota.
quota                  Enable plain user disk quota accounting.
noquota                Disable all plain disk quota option.

================================================================================
DEBUGFS ENTRIES
@@ -202,6 +216,15 @@ Files in /sys/fs/f2fs/<devname>
                              gc_idle = 1 will select the Cost Benefit approach
                              & setting gc_idle = 2 will select the greedy approach.

 gc_urgent                    This parameter controls triggering background GCs
                              urgently or not. Setting gc_urgent = 0 [default]
                              makes back to default behavior, while if it is set
                              to 1, background thread starts to do GC by given
                              gc_urgent_sleep_time interval.

 gc_urgent_sleep_time         This parameter controls sleep time for gc_urgent.
                              500 ms is set by default. See above gc_urgent.

 reclaim_segments             This parameter controls the number of prefree
                              segments to be reclaimed. If the number of prefree
			      segments is larger than the number of segments
+15 −2
Original line number Diff line number Diff line
@@ -1151,8 +1151,21 @@ access the data:
     usage.  This is called key->payload.rcu_data0.  The following accessors
     wrap the RCU calls to this element:

     (a) Set or change the first payload pointer:

		rcu_assign_keypointer(struct key *key, void *data);
	void *rcu_dereference_key(struct key *key);

     (b) Read the first payload pointer with the key semaphore held:

		[const] void *dereference_key_locked([const] struct key *key);

	 Note that the return value will inherit its constness from the key
	 parameter.  Static analysis will give an error if it things the lock
	 isn't held.

     (c) Read the first payload pointer with the RCU read lock held:

		const void *dereference_key_rcu(const struct key *key);


===================
+1 −1
Original line number Diff line number Diff line
@@ -2432,7 +2432,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
	}

	down_read(&key->sem);
	upayload = user_key_payload(key);
	upayload = user_key_payload_locked(key);
	if (IS_ERR_OR_NULL(upayload)) {
		rc = upayload ? PTR_ERR(upayload) : -EINVAL;
		goto out_key_put;
+0 −3
Original line number Diff line number Diff line
config FS_ENCRYPTION
	tristate "FS Encryption (Per-file encryption)"
	depends on BLOCK
	select CRYPTO
	select CRYPTO_AES
	select CRYPTO_CBC
@@ -8,9 +7,7 @@ config FS_ENCRYPTION
	select CRYPTO_XTS
	select CRYPTO_CTS
	select CRYPTO_CTR
	select CRYPTO_SHA256
	select KEYS
	select ENCRYPTED_KEYS
	help
	  Enable encryption of files and directories.  This
	  feature is similar to ecryptfs, but it is more memory
Loading