Clean up gfs2_iomap_alloc and gfs2_iomap_get. Document how
gfs2_iomap_alloc works. gfs2_iomap_alloc now needs to be called
separately after gfs2_iomap_get where necessary; this will be used later
by iomap write. Move gfs2_iomap_ops into bmap.c.
Signed-off-by: Andreas Gruenbacher
Add write_begin and write_end operations to struct iomap_ops to provide
a way of overriding the default behavior of iomap_write_begin and
iomap_write_end. This is needed for implementing data journaling: in
the data journaling case, pages are written into the journal before
being written back to
In journaled data mode, we need to add each buffer head to the current
transaction. In ordered write mode, we only need to add the inode to
the ordered inode list. So far, both cases are handled in
gfs2_trans_add_data. This makes the code look misleading and is
inefficient for small block sizes
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.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/aops.c |
Instead of falling back to generic_file_write_iter when writing to a
stuffed file that stays stuffed, implement that case separately. We
eventually want to get rid of the remaining users of gfs2_write_begin +
gfs2_write_end so that those functions can eventually be removed, and
Hello,
this patch queue converts gfs2 to use iomap for buffered writes, which
uses multi-page block allocations for large writes instead of a separate
allocation for each page of data.
Apply on top of the current gfs2 for-next branch:
First, change the sanity check in gfs2_stuffed_write_end to check for
the actual write size instead of the requested write size.
Second, use the existing teardown code in gfs2_write_end instead of
duplicating it in gfs2_stuffed_write_end.
Signed-off-by: Andreas Gruenbacher
Some of the info, warning, and error messages are missing their trailing
newline.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/lock_dlm.c | 4 ++--
fs/gfs2/rgrp.c | 2 +-
fs/gfs2/sys.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git
Warn when a log space reservation is stuck for more than 60 seconds.
Signed-off-by: Andreas Gruenbacher
---
fs/gfs2/log.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index cf6b46247df4..3e3bc63f5377
Hi,
Looks good. Do you have any figures for how big a reduction in inodes on
the order list this gives?
Steve.
On 29/01/18 05:02, Abhi Das wrote:
The vfs clears the I_DIRTY inode flag before calling gfs2_write_inode()
having queued any data that needed to be written to disk.
This is a good
Hi Andy,
- Original Message -
| I've just realised that these aren't in for-next despite the positive
| response. Can they get in for the upcoming merge window?
Your three patches are indeed already included in for-next and
have been for some time. I'm not sure why you're not seeing
On 29/01/18 13:30, Bob Peterson wrote:
Hi Andy,
- Original Message -
| I've just realised that these aren't in for-next despite the positive
| response. Can they get in for the upcoming merge window?
Your three patches are indeed already included in for-next and
have been for some
- Original Message -
> From: "Steven Whitehouse"
> To: "Abhi Das" , cluster-devel@redhat.com
> Sent: Monday, January 29, 2018 3:46:39 AM
> Subject: Re: [Cluster-devel] [GFS2 PATCH] gfs2: Remove inode from ordered
> write list in gfs2_write_inode()
>
From: Andreas Gruenbacher
Add an upper bound to the range of blocks to deallocate blocks to
function trunc_dealloc so that this function can be used for truncating
a file as well as for punching a hole into a file.
Signed-off-by: Andreas Gruenbacher
This patch adds a new structure called gfs2_log_header_v2 which is used
to store expanded fields into previously unused areas of the log headers
(i.e., this change is backwards compatible). Some of these are used for
debug purposes so we can backtrack when problems occur. Others are
reserved for
Before this patch, there was a lot of code redundancy between functions
log_write_header (which uses bio) and clean_journal (which uses
buffer_head). This patch reduces the redundancy to simplify the code
and make log header writing more consistent. We want more consistency
and reduced redundancy
From: Andreas Gruenbacher
Add a small inline function for computing the maximum size of a stuffed
inode instead of open coding that in several places throughout the code.
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Bob Peterson
From: Andreas Gruenbacher
The metadata read-ahead algorithm broke when switching from recursive to
non-recursive delete: the current algorithm reads ahead blocks at height
N - 1 while deallocating the blocks at hight N. However, deallocating
the blocks at height N requires
From: Andreas Gruenbacher
Implement the top-level bits of punching a hole into a file.
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Bob Peterson
---
fs/gfs2/bmap.c | 122
From: Andreas Gruenbacher
In rare cases, the current non-recursive delete algorithm doesn't
deallocate empty intermediary indirect blocks. This should have very
little practical effect, but deallocating all blocks correctly should
still be preferable as it is cleaner and
Signed-off-by: Bob Peterson
---
fs/gfs2/lops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 4a60221c678f..4d6567990baf 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -162,7 +162,7 @@ u64 gfs2_log_bmap(struct
From: Steven Whitehouse
Document when to use gfs2_blk2rgrpd for "inexact" resource group
matching. Based on that, fix an incorrect use of gfs2_blk2rgrpd in
sweep_bh_for_rgrps.
Signed-off-by: Steven Whitehouse
Signed-off-by: Andreas Gruenbacher
This patch just adds the capability for GFS2 to track which function
called gfs2_log_flush. This should make it easier to diagnose
problems based on the sequence of events found in the journals.
Signed-off-by: Bob Peterson
Reviewed-by: Andreas Gruenbacher
Before this patch, function gfs2_free_di was 4 lines of code, and
one of those lines was to call gfs2_free_uninit_di. Although
unlikely, if function gfs2_free_uninit_di encountered an error
finding the block to be freed, the error was silently ignored by the
caller, which went ahead and improperly
From: Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Bob Peterson
---
fs/gfs2/bmap.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index
From: Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Bob Peterson
---
fs/gfs2/bmap.c | 17 +++--
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
From: Andreas Gruenbacher
Split out the entire lookup loop from lookup_metapath and
fillup_metapath. Make both functions return the actual height in
mp->mp_aheight, and return 0 on success. Handle lookup errors properly
in trunc_dealloc.
Signed-off-by: Andreas Gruenbacher
From: Andreas Gruenbacher
Pull the code for computing the range of metapointers to iterate out of
gfs2_metapath_ra (for readahead), sweep_bh_for_rgrps (for deallocating
metapointers within a block), and trunc_dealloc (for walking the
metadata tree).
In sweep_bh_for_rgrps,
From: Andreas Gruenbacher
Turn gfs2_block_truncate_page into a function that zeroes a range within
a block rather than only the end of a block. This will be used for
cleaning the end of the first partial block and the start of the last
partial block when punching a hole in
From: Andreas Gruenbacher
The to parameter of gfs2_page_add_databufs is passed inconsistently:
once as from + len, once as from + len - 1. Just pass len instead.
In addition, once we're past the end, we can immediately break out of
the loop.
Signed-off-by: Andreas
From: Andrew Price
Add the rg_crc field to store a crc32 of the gfs2_rgrp structure. This
allows us to check resource group headers' integrity and removes the
requirement to check them against the rindex entries in fsck. If this
field is found to be zero, it should be ignored
From: Andreas Gruenbacher
The current transaction is being dereferenced before asserting that is
not NULL; that isn't going to help.
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Bob Peterson
---
fs/gfs2/trans.c | 1 -
1 file
From: Andreas Gruenbacher
First, this function truncates the file in chunks. When the original
file size isn't block aligned, each chunk that is truncated will remain
be misaligned. This is inefficient.
Second, this function doesn't recognize where holes are, so it loops
From: Andrew Price
Add a new rg_skip field to struct gfs2_rgrp, replacing __pad. The
rg_skip field has the following meaning:
- If rg_skip is zero, it is considered unset and not useful.
- If rg_skip is non-zero, its value will be the number of blocks between
this rgrp's
From: Andreas Gruenbacher
As a follow-up to commit d2bc5b3c67a9, remove the end parameter which is
now unused.
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Bob Peterson
---
fs/gfs2/aops.c | 5 ++---
1 file changed, 2
Hi,
We've got 27 patches for this merge window. These generally fall into
four categories: (1) code cleanups, (2) patches related to adding
PUNCH_HOLE support to GFS2, (3) support for new fields in resource group
headers, and (4) support for new fields in journal log headers.
These new fields,
From: Abhi Das
We iterate through the entire ordered writes list in
gfs2_ordered_write() to write out inodes. It's a good
place to try and shrink the list by throwing out inodes
that don't have any pages.
Signed-off-by: Abhi Das
Acked-by: Steven Whitehouse
From: Tetsuo Handa
init_gfs2_fs() is calling e.g. calling unregister_shrinker() without
register_shrinker() when an error occurred during initialization.
Rename goto labels and call appropriate undo function.
Signed-off-by: Tetsuo Handa
From: Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Bob Peterson
---
fs/gfs2/aops.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index
From: Andreas Gruenbacher
Get rid of gfs2_log_header_in by integrating it into get_log_header.
Clean up the crc32 computations and use the same functions for encoding
and decoding to make things less confusing. Eliminate lh_hash from
gfs2_log_header_host which is completely
From: Andrew Price
Add rg_data0, rg_data and rg_bitbytes to struct gfs2_rgrp. The fields
are identical to their counterparts in struct gfs2_rindex and are
intended to reduce the use of the rindex. For now the fields are only
written back as the in-memory equivalents in struct
Hi,
Before this patch, if function gfs2_unlink failed to get a valid
transaction (for example, not enough journal blocks) it would go
to label out_end_trans which did gfs2_trans_end. But if the
trans_begin failed, there's no transaction to end, and trying to
do so results in: kernel BUG at
On 29 January 2018 at 18:07, Bob Peterson wrote:
> Hi,
>
> Before this patch, if function gfs2_unlink failed to get a valid
> transaction (for example, not enough journal blocks) it would go
> to label out_end_trans which did gfs2_trans_end. But if the
> trans_begin failed,
43 matches
Mail list logo