Skip to contentSkip to conversation

ocfs2-adjust-minlen-with-discard_granularity-in-the-fitrim-ioctl.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 22, 2014 OCFS2

lore
Share & tools
lore
#0 lore raw

Subject: [merged] ocfs2-adjust-minlen-with-discard_granularity-in-the-fitrim-ioctl.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 22 Jan 2014 12:11:55 -0800

The patch titled
Subject: ocfs2: adjust minlen with discard_granularity in the FITRIM ioctl
has been removed from the -mm tree. Its filename was
ocfs2-adjust-minlen-with-discard_granularity-in-the-fitrim-ioctl.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Jie Liu <[email protected]>
Subject: ocfs2: adjust minlen with discard_granularity in the FITRIM ioctl

Adjust minlen with discard_granularity for FITRIM ioctl(2) if the given minimum size in bytes is less than it because, discard granularity is used to tell us that the minimum size of extent that can be discarded by the storage device.

This is inspired by ext4 commit 5c2ed62fd4 ("ext4: Adjust minlen with discard_granularity in the FITRIM ioctl") from Lukas Czerner.

---

 fs/ocfs2/ioctl.c |    2 ++
 1 file changed, 2 insertions(+)
fs/ocfs2/ioctl.c renamed from fs/ocfs2/ioctl.c~ocfs2-adjust-minlen-with-discard_granularity-in-the-fitrim-ioctl +2 -0
diff -puN fs/ocfs2/ioctl.c~ocfs2-adjust-minlen-with-discard_granularity-in-the-fitrim-ioctl fs/ocfs2/ioctl.c
@@ -980,6 +980,8 @@ long ocfs2_ioctl(struct file *filp, unsi
 		if (copy_from_user(&range, argp, sizeof(range)))
 			return -EFAULT;
 
+		range.minlen = max_t(u64, q->limits.discard_granularity,
+				     range.minlen);
 		ret = ocfs2_trim_fs(sb, &range);
 		if (ret < 0)
 			return ret;

_

Patches currently in -mm which might be from [email protected] are

origin.patch ocfs2-should-call-ocfs2_journal_access_di-before-ocfs2_delete_entry-in-ocfs2_orphan_del.patch ocfs2-llseek-requires-ocfs2-inode-lock-for-the-file-in-seek_end.patch ocfs2-fix-issue-that-ocfs2_setattr-does-not-deal-with-new_i_size==i_size.patch binfmt_elfc-use-get_random_int-to-fix-entropy-depleting.patch
linux-next.patch