Hi,
On 4/23/23 22:49, Christoph Hellwig wrote:
> def_blk_fops always returns -ENODEV, which dosn't match the return value
> of a non-existing block device with CONFIG_BLOCK, which is -ENXIO.
> Just remove the extra implementation and fall back to the default
> no_open_fops that always returns
On Mon, Apr 24, 2023 at 12:22:30PM -0700, Randy Dunlap wrote:
> On 4/23/23 22:49, Christoph Hellwig wrote:
> > + if (IS_ENABLED(CONFIG_BLOCK))
> > + inode->i_fop = _blk_fops;
>
> It looks like def_blk_fops is being removed (commit message and patch
> fragment below),
On Mon, Apr 24, 2023 at 8:22 AM Christoph Hellwig wrote:
> All callers of generic_perform_write need to updated ki_pos, move it into
> common code.
We've actually got a similar situation with
iomap_file_buffered_write() and its callers. Would it make sense to
fix that up as well?
>
On 4/24/23 10:08 AM, Andreas Gruenbacher wrote:
point the GFS2_LOG_HEAD_FLUSH_SHUTDOWN has been set by gfs2_make_fs_ro.
Do you mean that at that point, the SDF_JOURNAL_LIVE flag has already
been cleared?
Ah, yes, you are correct. That was a think-o. Please adjust as appropriate.
Regards,
On Fri, Apr 21, 2023 at 9:07 PM Bob Peterson wrote:
> Before this patch function gfs2_make_fs_ro called gfs2_log_flush once to
> finalize the log. However, if there's dirty metadata, log flushes tend
> to sync the metadata and formulate revokes. Before this patch, those
> revokes may not be
On Fri, Apr 21, 2023 at 9:07 PM Bob Peterson wrote:
> Before this patch, function gfs2_ail_empty_gl did not return errors it
> encountered from __gfs2_trans_begin. Those errors usually came from the
> fact that the file system was made read-only, often due to unmount,
> (but theoretically could
On Mon, Apr 24, 2023 at 01:30:56PM +0100, Matthew Wilcox wrote:
> On Mon, Apr 24, 2023 at 07:49:12AM +0200, Christoph Hellwig wrote:
> > block_page_mkwrite_return is neither block nor mkwrite specific, and
> > should not be under CONFIG_BLOCK. Move it to mm.h and rename it to
> >
On Mon, Apr 24, 2023 at 07:49:12AM +0200, Christoph Hellwig wrote:
> block_page_mkwrite_return is neither block nor mkwrite specific, and
> should not be under CONFIG_BLOCK. Move it to mm.h and rename it to
> errno_to_vmfault.
Could you move it about 300 lines down and put it near vmf_error()
so
Hi,
> Hi,
>
> On Sat, 2023-04-22 at 09:20 +0800, Wang Yugui wrote:
> > Hi,
> >
> > Is there some work for gfs2 multiple device support?
> >
> Do you mean multiple devices generically, or specifically the md
> driver?
>
> > if multiple device support,
> > 1, No need of RAID 0/1/5/6 support.
>
Hi,
On Sat, 2023-04-22 at 09:20 +0800, Wang Yugui wrote:
> Hi,
>
> Is there some work for gfs2 multiple device support?
>
Do you mean multiple devices generically, or specifically the md
driver?
> if multiple device support,
> 1, No need of RAID 0/1/5/6 support.
> nvme SSD is fast enough
Hi,
Is there some work for gfs2 multiple device support?
if multiple device support,
1, No need of RAID 0/1/5/6 support.
nvme SSD is fast enough for single thread write.
2, can we limit one journal into one device?
3, can we just write lock one device, so better write throughput?
Best
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
Fold emergency_thaw_bdev into it's only caller, to prepare for buffer.c
to be built only when buffer_head support is enabled.
Signed-off-by: Christoph Hellwig
---
fs/buffer.c | 6 --
fs/internal.h | 6 --
fs/super.c| 4 +++-
3 files changed, 3 insertions(+), 13 deletions(-)
diff
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/Kconfig b/block/Kconfig
index
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,
after all the talk about removing buffer_heads, here is a series that
shows how to build a kernel without buffer_heads. And how unrealistic
it is to remove the entirely.
Most of the series refactors some common code to make implementing direct
I/O easier without use of the ->direct_IO
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
Open code __generic_file_write_iter to remove the indirect call into
->direct_IO and to prepare using the iomap based write code.
Signed-off-by: Christoph Hellwig
---
block/fops.c | 46 --
1 file changed, 44 insertions(+), 2 deletions(-)
diff --git
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
block_page_mkwrite_return is neither block nor mkwrite specific, and
should not be under CONFIG_BLOCK. Move it to mm.h and rename it to
errno_to_vmfault.
Signed-off-by: Christoph Hellwig
---
fs/ext4/inode.c | 2 +-
fs/f2fs/file.c | 2 +-
fs/gfs2/file.c |
Remove the no needed plug in blkdev_write_iter. For direct I/O that
issues more than a single I/O, the plug is already done in
__blkdev_direct_IO, and for synchronous buffered writes, the plug
is done in writeback_inodes_wb / wb_writeback, while for the other
cases a plug doesn't make sense.
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
def_blk_fops always returns -ENODEV, which dosn't match the return value
of a non-existing block device with CONFIG_BLOCK, which is -ENXIO.
Just remove the extra implementation and fall back to the default
no_open_fops that always returns -ENXIO.
Signed-off-by: Christoph Hellwig
---
fs/Makefile
Direct I/O on block devices now nevers goes through aops->direct_IO.
Stop setting it and set the FMODE_CAN_ODIRECT in ->open instead.
Signed-off-by: Christoph Hellwig
---
block/fops.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/fops.c b/block/fops.c
index
Move the assignment to current->backing_dev_info from the callers into
iomap_file_buffered_write. Note that zonefs was missing this assignment
before.
Signed-off-by: Christoph Hellwig
---
fs/gfs2/file.c | 3 ---
fs/iomap/buffered-io.c | 4
fs/xfs/xfs_file.c | 5 -
3 files
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 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@
On Sun, Apr 23, 2023 at 11:18:25PM -0700, Darrick J. Wong wrote:
> > @@ -876,8 +877,11 @@ iomap_file_buffered_write(struct kiocb *iocb, struct
> > iov_iter *i,
> > if (iocb->ki_flags & IOCB_NOWAIT)
> > iter.flags |= IOMAP_NOWAIT;
> >
> > + current->backing_dev_info =
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 +++---
Refator the fuse direct write code so that the fuse_perform_write
callig convention is simplified to match generic_perform_write and
it's updating ki_pos directly, and the generic direct_write_fallback
helper is used to consolidate buffered I/O fallback code.
Signed-off-by: Christoph Hellwig
---
On Mon, Apr 24, 2023 at 07:49:20AM +0200, Christoph Hellwig wrote:
> Move the assignment to current->backing_dev_info from the callers into
> iomap_file_buffered_write. Note that zonefs was missing this assignment
> before.
>
> Signed-off-by: Christoph Hellwig
> ---
> fs/gfs2/file.c |
30 matches
Mail list logo