Hi,
Thanks for the report, it will be helpful if you can provide a
reproducer.
On 2023/5/19 15:13, butt3rflyh4ck wrote:
Hi, there is a null-ptr-deref bug in f2fs_write_end_io in
fs/f2fs/data.c, I reproduce it in the latest kernel too.
#Quick description
When a thread always calls F2FS_IOC_RES
On 4/24/23 07:49, Christoph Hellwig wrote:
Use iomap in buffer_head compat mode to write to block devices.
Signed-off-by: Christoph Hellwig
---
block/Kconfig | 1 +
block/fops.c | 33 +
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/block/K
On 4/24/23 07:49, Christoph Hellwig wrote:
buffer_check_dirty_writeback is only used by the block device aops,
remove the export.
Signed-off-by: Christoph Hellwig
---
fs/buffer.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 9e1e2add541e07..eb14fbaa7d35f7
pos is always equal to iocb->ki_pos, and mapping is always equal to
iocb->ki_filp->f_mapping.
Signed-off-by: Christoph Hellwig
---
fs/fuse/file.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index fd2f27f2144750..5f7b58798f99fc 1
Use the generic direct_write_fallback helper instead of duplicating the
logic.
Signed-off-by: Christoph Hellwig
---
fs/fuse/file.c | 27 +++
1 file changed, 3 insertions(+), 24 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 5f7b58798f99fc..02ab446ab57f1f
Add a helper dealing with handling the syncing of a buffered write fallback
for direct I/O.
Signed-off-by: Christoph Hellwig
---
fs/libfs.c | 36
include/linux/fs.h | 2 ++
mm/filemap.c | 59 ++
3 files chang
Both callers of fuse_perform_write need to updated ki_pos, move it into
common code.
Signed-off-by: Christoph Hellwig
---
fs/fuse/file.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 89d97f6188e05e..fd2f27f21
Add a helper to invalidate page cache after a dio write.
Signed-off-by: Christoph Hellwig
---
fs/direct-io.c | 10 ++
fs/iomap/direct-io.c| 12 ++--
include/linux/fs.h | 5 -
include/linux/pagemap.h | 1 +
mm/filemap.c| 37 -
Use the common helpers for direct I/O page invalidation instead of
open coding the logic. This leads to a slight reordering of checks
in __iomap_dio_rw to keep the logic straight.
Signed-off-by: Christoph Hellwig
---
fs/iomap/direct-io.c | 55
1 file
Move the assignment to current->backing_dev_info from the callers into
iomap_file_buffered_write to reduce boiler plate code and reduce the
scope to just around the page dirtying loop.
Note that zonefs was missing this assignment before.
Signed-off-by: Christoph Hellwig
---
fs/gfs2/file.c
All callers of generic_perform_write need to updated ki_pos, move it into
common code.
Signed-off-by: Christoph Hellwig
---
fs/ceph/file.c | 2 --
fs/ext4/file.c | 9 +++--
fs/f2fs/file.c | 1 -
fs/nfs/file.c | 1 -
mm/filemap.c | 8
5 files changed, 7 insertions(+), 14 deletions
Move the assignment to current->backing_dev_info from the callers into
generic_perform_write to reduce boiler plate code and reduce the scope
to just around the page dirtying loop.
Signed-off-by: Christoph Hellwig
---
fs/ceph/file.c | 4
fs/ext4/file.c | 3 ---
fs/f2fs/file.c | 2 --
fs/nfs
Factor out a helper that does filemap_write_and_wait_range for a the
range covered by a read kiocb, or returns -EAGAIN if the kiocb
is marked as nowait and there would be pages to write.
Signed-off-by: Christoph Hellwig
---
block/fops.c| 18 +++---
include/linux/pagemap.h
All callers of iomap_file_buffered_write need to updated ki_pos, move it
into common code.
Signed-off-by: Christoph Hellwig
---
fs/gfs2/file.c | 4 +---
fs/iomap/buffered-io.c | 9 ++---
fs/xfs/xfs_file.c | 2 --
fs/zonefs/file.c | 4 +---
4 files changed, 8 insertions(+),
Move the ki_pos update down a bit to prepare for a better common
helper that invalidates pages based of an iocb.
Signed-off-by: Christoph Hellwig
---
fs/iomap/direct-io.c | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/fs/iomap/direct-io.c b/fs/iomap/d
Factor out a helper that calls filemap_write_and_wait_range and
invalidate_inode_pages2_rangefor a the range covered by a write kiocb or
returns -EAGAIN if the kiocb is marked as nowait and there would be pages
to write or invalidate.
Signed-off-by: Christoph Hellwig
---
include/linux/pagemap.h
Hi all,
this series cleans up some of the generic write helper calling
conventions and the page cache writeback / invalidation for
direct I/O. This is a spinoff from the no-bufferhead kernel
project, for while we'll want to an use iomap based buffered
write path in the block layer.
diffstat:
bl
Provide a splice_read stub for f2fs. This does some checks and tracing
before proceeding and will switch from direct-I/O to buffered I/O if forced
or if misaligned. It also updates the iostats after doing a buffered I/O.
[Note: I wonder if I should only do the tracing if I call
filemap_splice_re
Hi, there is a null-ptr-deref bug in f2fs_write_end_io in
fs/f2fs/data.c, I reproduce it in the latest kernel too.
#Quick description
When a thread always calls F2FS_IOC_RESIZE_FS to resize fs, if resize
fs is failed, f2fs kernel thread would invoke callback function to
update
f2fs io info, it
19 matches
Mail list logo