* [PATCH] ext4: remove unnecessary test_opt for DIOREAD_NOLOCK
@ 2020-04-13 4:24 xiakaixu1987
2020-04-13 4:38 ` Ritesh Harjani
2020-05-07 15:01 ` Theodore Y. Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: xiakaixu1987 @ 2020-04-13 4:24 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso, adilger.kernel, Kaixu Xia
From: Kaixu Xia <kaixuxia@tencent.com>
The DIOREAD_NOLOCK flag has been cleared when doing the test_opt
that is meaningless, so remove the unnecessary test_opt for DIOREAD_NOLOCK.
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
fs/ext4/super.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9728e7b0e84f..855874ea4b29 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3973,17 +3973,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) {
printk_once(KERN_WARNING "EXT4-fs: Warning: mounting with data=journal disables delayed allocation, dioread_nolock, and O_DIRECT support!\n");
+ /* can't mount with both data=journal and dioread_nolock. */
clear_opt(sb, DIOREAD_NOLOCK);
if (test_opt2(sb, EXPLICIT_DELALLOC)) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"both data=journal and delalloc");
goto failed_mount;
}
- if (test_opt(sb, DIOREAD_NOLOCK)) {
- ext4_msg(sb, KERN_ERR, "can't mount with "
- "both data=journal and dioread_nolock");
- goto failed_mount;
- }
if (test_opt(sb, DAX)) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"both data=journal and dax");
--
2.20.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: remove unnecessary test_opt for DIOREAD_NOLOCK
2020-04-13 4:24 [PATCH] ext4: remove unnecessary test_opt for DIOREAD_NOLOCK xiakaixu1987
@ 2020-04-13 4:38 ` Ritesh Harjani
2020-05-07 15:01 ` Theodore Y. Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Ritesh Harjani @ 2020-04-13 4:38 UTC (permalink / raw)
To: xiakaixu1987, linux-ext4; +Cc: tytso, adilger.kernel, Kaixu Xia
On 4/13/20 9:54 AM, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
>
> The DIOREAD_NOLOCK flag has been cleared when doing the test_opt
> that is meaningless, so remove the unnecessary test_opt for DIOREAD_NOLOCK.
>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Make sense.
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
> ---
> fs/ext4/super.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 9728e7b0e84f..855874ea4b29 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -3973,17 +3973,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>
> if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) {
> printk_once(KERN_WARNING "EXT4-fs: Warning: mounting with data=journal disables delayed allocation, dioread_nolock, and O_DIRECT support!\n");
> + /* can't mount with both data=journal and dioread_nolock. */
> clear_opt(sb, DIOREAD_NOLOCK);
> if (test_opt2(sb, EXPLICIT_DELALLOC)) {
> ext4_msg(sb, KERN_ERR, "can't mount with "
> "both data=journal and delalloc");
> goto failed_mount;
> }
> - if (test_opt(sb, DIOREAD_NOLOCK)) {
> - ext4_msg(sb, KERN_ERR, "can't mount with "
> - "both data=journal and dioread_nolock");
> - goto failed_mount;
> - }
> if (test_opt(sb, DAX)) {
> ext4_msg(sb, KERN_ERR, "can't mount with "
> "both data=journal and dax");
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: remove unnecessary test_opt for DIOREAD_NOLOCK
2020-04-13 4:24 [PATCH] ext4: remove unnecessary test_opt for DIOREAD_NOLOCK xiakaixu1987
2020-04-13 4:38 ` Ritesh Harjani
@ 2020-05-07 15:01 ` Theodore Y. Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Y. Ts'o @ 2020-05-07 15:01 UTC (permalink / raw)
To: xiakaixu1987; +Cc: linux-ext4, adilger.kernel, Kaixu Xia
On Mon, Apr 13, 2020 at 12:24:22PM +0800, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
>
> The DIOREAD_NOLOCK flag has been cleared when doing the test_opt
> that is meaningless, so remove the unnecessary test_opt for DIOREAD_NOLOCK.
>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-07 15:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 4:24 [PATCH] ext4: remove unnecessary test_opt for DIOREAD_NOLOCK xiakaixu1987
2020-04-13 4:38 ` Ritesh Harjani
2020-05-07 15:01 ` Theodore Y. Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).