diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2018-06-24 15:04:04 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2018-07-02 16:27:17 +0100 |
commit | 64bc06bb32ee9cf458f432097113c8b495d75757 (patch) | |
tree | c87afdeaf0cd1c34ad4cf57c64a9a2c4678d84da /fs/gfs2/aops.h | |
parent | d505a96a3b16f46455035dc0296bc2da6014e163 (diff) | |
download | linux-riscv-64bc06bb32ee9cf458f432097113c8b495d75757.tar.gz linux-riscv-64bc06bb32ee9cf458f432097113c8b495d75757.tar.bz2 linux-riscv-64bc06bb32ee9cf458f432097113c8b495d75757.zip |
gfs2: iomap buffered write support
With the traditional page-based writes, blocks are allocated separately
for each page written to. With iomap writes, we can allocate a lot more
blocks at once, with a fraction of the allocation overhead for each
page.
Split calculating the number of blocks that can be allocated at a given
position (gfs2_alloc_size) off from gfs2_iomap_alloc: that size
determines the number of blocks to allocate and reserve in the journal.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/aops.h')
-rw-r--r-- | fs/gfs2/aops.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/gfs2/aops.h b/fs/gfs2/aops.h new file mode 100644 index 000000000000..fa8e5d0144dd --- /dev/null +++ b/fs/gfs2/aops.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2018 Red Hat, Inc. All rights reserved. + */ + +#ifndef __AOPS_DOT_H__ +#define __AOPS_DOT_H__ + +#include "incore.h" + +extern int stuffed_readpage(struct gfs2_inode *ip, struct page *page); +extern int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh, + loff_t pos, unsigned copied, + struct page *page); +extern void adjust_fs_space(struct inode *inode); +extern void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page, + unsigned int from, unsigned int len); + +#endif /* __AOPS_DOT_H__ */ |