* [f2fs-dev] [PATCH v2] f2fs: fix to return -EOPNOTSUPP for uncached write
@ 2025-08-05 6:19 ` Chao Yu
0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2025-08-05 6:19 UTC (permalink / raw)
To: jaegeuk; +Cc: Jens Axboe, Qi Han, linux-kernel, linux-f2fs-devel
f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE
flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag
and write w/o uncached IO.
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Qi Han <hanqi@vivo.com>
Signed-off-by: Chao Yu <chao@kernel.org>
---
v2:
- fix author info
fs/f2fs/file.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 9b8d24097b7a..7f09cad6b6d7 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -5185,6 +5185,11 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
goto out;
}
+ if (iocb->ki_flags & IOCB_DONTCACHE) {
+ ret = -EOPNOTSUPP;
+ goto out;
+ }
+
if (!f2fs_is_compress_backend_ready(inode)) {
ret = -EOPNOTSUPP;
goto out;
--
2.49.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] f2fs: fix to return -EOPNOTSUPP for uncached write
@ 2025-08-05 6:19 ` Chao Yu
0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2025-08-05 6:19 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu, Jens Axboe, Qi Han
f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE
flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag
and write w/o uncached IO.
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Qi Han <hanqi@vivo.com>
Signed-off-by: Chao Yu <chao@kernel.org>
---
v2:
- fix author info
fs/f2fs/file.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 9b8d24097b7a..7f09cad6b6d7 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -5185,6 +5185,11 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
goto out;
}
+ if (iocb->ki_flags & IOCB_DONTCACHE) {
+ ret = -EOPNOTSUPP;
+ goto out;
+ }
+
if (!f2fs_is_compress_backend_ready(inode)) {
ret = -EOPNOTSUPP;
goto out;
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH v2] f2fs: fix to return -EOPNOTSUPP for uncached write
2025-08-05 6:19 ` Chao Yu
@ 2025-08-05 15:37 ` Jens Axboe
-1 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2025-08-05 15:37 UTC (permalink / raw)
To: Chao Yu, jaegeuk; +Cc: Qi Han, linux-kernel, linux-f2fs-devel
On 8/5/25 12:19 AM, Chao Yu wrote:
> f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE
> flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag
> and write w/o uncached IO.
Didn't we agree that write support should be pursued first before
bifurcating the read/write DONTCACHE support?
--
Jens Axboe
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] f2fs: fix to return -EOPNOTSUPP for uncached write
@ 2025-08-05 15:37 ` Jens Axboe
0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2025-08-05 15:37 UTC (permalink / raw)
To: Chao Yu, jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Qi Han
On 8/5/25 12:19 AM, Chao Yu wrote:
> f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE
> flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag
> and write w/o uncached IO.
Didn't we agree that write support should be pursued first before
bifurcating the read/write DONTCACHE support?
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH v2] f2fs: fix to return -EOPNOTSUPP for uncached write
2025-08-05 15:37 ` Jens Axboe
@ 2025-08-06 1:51 ` Chao Yu
-1 siblings, 0 replies; 6+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2025-08-06 1:51 UTC (permalink / raw)
To: Jens Axboe, jaegeuk; +Cc: Qi Han, linux-kernel, linux-f2fs-devel
On 8/5/25 23:37, Jens Axboe wrote:
> On 8/5/25 12:19 AM, Chao Yu wrote:
>> f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE
>> flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag
>> and write w/o uncached IO.
>
> Didn't we agree that write support should be pursued first before
> bifurcating the read/write DONTCACHE support?
Yeah, no worries, this is just used for test purpose, will drop this once
Qi Han prepare the new patchset supporting dontcache in both read and write
path. :)
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] f2fs: fix to return -EOPNOTSUPP for uncached write
@ 2025-08-06 1:51 ` Chao Yu
0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2025-08-06 1:51 UTC (permalink / raw)
To: Jens Axboe, jaegeuk; +Cc: chao, linux-f2fs-devel, linux-kernel, Qi Han
On 8/5/25 23:37, Jens Axboe wrote:
> On 8/5/25 12:19 AM, Chao Yu wrote:
>> f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE
>> flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag
>> and write w/o uncached IO.
>
> Didn't we agree that write support should be pursued first before
> bifurcating the read/write DONTCACHE support?
Yeah, no worries, this is just used for test purpose, will drop this once
Qi Han prepare the new patchset supporting dontcache in both read and write
path. :)
Thanks,
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-08-06 1:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05 6:19 [f2fs-dev] [PATCH v2] f2fs: fix to return -EOPNOTSUPP for uncached write Chao Yu via Linux-f2fs-devel
2025-08-05 6:19 ` Chao Yu
2025-08-05 15:37 ` [f2fs-dev] " Jens Axboe
2025-08-05 15:37 ` Jens Axboe
2025-08-06 1:51 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-08-06 1:51 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.