[Cluster-devel] [PATCH v3 2/3] gfs2: lookup local statfs inodes prior to journal recovery

2020-10-20 Thread Abhi Das
info for other nodes in the cluster. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 8 +++ fs/gfs2/ops_fstype.c | 133 +++ fs/gfs2/super.c | 31 +- fs/gfs2/super.h | 3 + 4 files changed, 139 insertions(+), 36 deletions(-) diff

[Cluster-devel] [PATCH v3 3/3] gfs2: Recover statfs info in journal head

2020-10-20 Thread Abhi Das
with the local statfs inodes altogether and keep the statfs changes solely in the journal. Signed-off-by: Abhi Das --- fs/gfs2/lops.c | 2 +- fs/gfs2/lops.h | 1 + fs/gfs2/recovery.c | 104 + 3 files changed, 106 insertions(+), 1 deletion(-) diff

[Cluster-devel] [PATCH v3 0/3] gfs2: local statfs improvements

2020-10-20 Thread Abhi Das
found with xfstests:generic/034. Turns out we weren't looking up the statfs inodes early enough in the mount process. I also added some comments in the code. Abhi Das (3): gfs2: Add fields for statfs info in struct gfs2_log_header_host gfs2: lookup local statfs inodes prior to journal recovery

[Cluster-devel] [PATCH v3 1/3] gfs2: Add fields for statfs info in struct gfs2_log_header_host

2020-10-20 Thread Abhi Das
And read these in __get_log_header() from the log header. Also make gfs2_statfs_change_out() non-static so it can be used outside of super.c Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 4 fs/gfs2/recovery.c | 4 fs/gfs2/super.c| 2 +- fs/gfs2/super.h| 2 ++ 4 files

[Cluster-devel] [PATCH v2 1/3] gfs2: Add fields for statfs info in struct gfs2_log_header_host

2020-09-24 Thread Abhi Das
And read these in __get_log_header() from the log header. Also make gfs2_statfs_change_out() non-static so it can be used outside of super.c Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 4 fs/gfs2/recovery.c | 4 fs/gfs2/super.c| 2 +- fs/gfs2/super.h| 2 ++ 4 files

[Cluster-devel] [PATCH v2 2/3] gfs2: lookup local statfs inodes at mount time

2020-09-24 Thread Abhi Das
We require these inodes during journal recovery when we attempt to recover the statfs file. We are not able to lookup inodes at that time due to locks being blocked so we pre-lookup these inodes and save them in a linked list. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 7 +++ fs

[Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements

2020-09-24 Thread Abhi Das
This patchset allows gfs2 to sync statfs info from the journal to the master statfs file during a log flush or during recovery. We still write to the local statfs file to allow older versions to recover the statfs info of newer kernels with this patchset. Abhi Das (3): gfs2: Add fields

[Cluster-devel] [PATCH v2 3/3] gfs2: Recover statfs info in journal head

2020-09-24 Thread Abhi Das
Apply the outstanding statfs changes in the journal head to the master statfs file. Zero out the local statfs file for good measure. Signed-off-by: Abhi Das --- fs/gfs2/lops.c | 2 +- fs/gfs2/lops.h | 1 + fs/gfs2/recovery.c | 71 ++ 3 files

[Cluster-devel] [PATCH 1/3] gfs2: Don't write updates to local statfs file

2020-08-13 Thread Abhi Das
We store the local statfs info in the journal header now so there's no need to write to the local statfs file anymore. Signed-off-by: Abhi Das --- fs/gfs2/lops.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index cb2a11b458c6

[Cluster-devel] [PATCH 2/3] gfs2: Add fields for statfs info in struct gfs2_log_header_host

2020-08-13 Thread Abhi Das
And read these in __get_log_header() from the log header. Also make gfs2_statfs_change_out() non-static so it can be used outside of super.c Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 4 fs/gfs2/recovery.c | 4 fs/gfs2/super.c| 2 +- fs/gfs2/super.h| 2 ++ 4 files

[Cluster-devel] [PATCH 0/3] local statfs improvements

2020-08-13 Thread Abhi Das
With this patchset, we don't write to the local statfs file anymore. The local statfs data is written into the journal and synced to the master statfs file during a log flush or during recovery. Abhi Das (3): gfs2: Don't write updates to local statfs file gfs2: Add fields for statfs info

[Cluster-devel] [PATCH 3/3] gfs2: Recover statfs info in journal head

2020-08-13 Thread Abhi Das
Apply the outstanding statfs changes in the journal head to the master statfs file. Zero out the local statfs file for good measure. Signed-off-by: Abhi Das --- fs/gfs2/lops.c | 2 +- fs/gfs2/lops.h | 1 + fs/gfs2/recovery.c | 121 + 3

[Cluster-devel] [GFS2 PATCH v2] gfs2: fix gfs2_find_jhead that returns uninitialized jhead with seq 0

2020-02-04 Thread Abhi Das
in the caller. For instance, a mount fails in one test case. The correct behavior is for it to continue searching through the journal to find the correct journal head with the highest sequence number. Signed-off-by: Abhi Das --- fs/gfs2/lops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Cluster-devel] [GFS2 PATCH] gfs2: fix gfs2_find_jhead that returns jhead with seq 0

2020-02-04 Thread Abhi Das
When the first log header in a journal happens to have a sequence number of 0, a bug in gfs2_find_jhead() returns this to be the jhead, instead of seeking forward and looking further into the journal for a jhead with a higher sequence number. Signed-off-by: Abhi Das --- fs/gfs2/lops.c | 2 +- 1

[Cluster-devel] [PATCH] gfs2: read journal in large chunks to locate the head

2019-05-02 Thread Abhi Das
Use bio(s) to read in the journal sequentially in large chunks and locate the head of the journal. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glops.c | 3 +- fs/gfs2/log.c| 4 +- fs/gfs2/lops.c | 212

[Cluster-devel] [PATCH v2] gfs2: fix race between gfs2_freeze_func and unmount

2019-04-30 Thread Abhi Das
detailed explanation of how freeze/unfreeze work. This patch causes gfs2_unfreeze() to wait for gfs2_freeze_func() to complete before returning to the user. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 1 + fs/gfs2/super.c | 8 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git

[Cluster-devel] [PATCH] gfs2: fix race between gfs2_freeze_func and unmount

2019-04-30 Thread Abhi Das
before returning to the user. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 1 + fs/gfs2/super.c | 8 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 78c8e761b321..b15755068593 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h

[Cluster-devel] [GFS2 PATCH] Revert "gfs2: read journal in large chunks to locate the head"

2019-02-13 Thread Abhi Das
This reverts commit 2a5f14f279f59143139bcd1606903f2f80a34241. This patch causes xfstests generic/311 to fail. Reverting this for now until we have a proper fix. Signed-off-by: Abhi Das --- fs/gfs2/glops.c | 1 - fs/gfs2/log.c| 4 +- fs/gfs2/lops.c | 190

[Cluster-devel] [GFS2 v2 PATCH 4/4] gfs2: read journal in large chunks to locate the head

2018-10-18 Thread Abhi Das
Use bio(s) to read in the journal sequentially in large chunks and locate the head of the journal. This version addresses the issues Christoph pointed out w.r.t error handling and using deprecated API. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher Cc: Christoph Hellwig --- fs

[Cluster-devel] [GFS2 PATCH 4/4] gfs2: read journal in large chunks to locate the head

2018-10-15 Thread Abhi Das
Use bio(s) to read in the journal sequentially in large chunks and locate the head of the journal. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glops.c | 1 + fs/gfs2/lops.c | 167 ++- fs/gfs2/lops.h

[Cluster-devel] [GFS2 PATCH 3/4] gfs2: add a helper function to get_log_header that can be used elsewhere

2018-10-15 Thread Abhi Das
Move and re-order the error checks and hash/crc computations into another function __get_log_header() so it can be used in scenarios where buffer_heads are not being used for the log header. Signed-off-by: Abhi Das --- fs/gfs2/recovery.c | 53

[Cluster-devel] [GFS2 PATCH 2/4] gfs2: changes to gfs2_log_XXX_bio

2018-10-15 Thread Abhi Das
Change gfs2_log_XXX_bio family of functions so they can be used with different bios, not just sdp->sd_log_bio. This patch also contains some clean up suggested by Andreas. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher --- fs/gfs2/log.c | 4 ++-- fs/gfs2/lops.c |

[Cluster-devel] [GFS2 PATCH 1/4] gfs2: add more timing info to journal recovery process

2018-10-15 Thread Abhi Das
Tells you how many milliseconds map_journal_extents and find_jhead take. Signed-off-by: Abhi Das --- fs/gfs2/bmap.c | 8 ++-- fs/gfs2/recovery.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 5f3ea07..aaf3682 100644 --- a/fs

[Cluster-devel] [GFS2 PATCH 0/4] jhead lookup using bios

2018-10-15 Thread Abhi Das
ran to completion with this. Abhi Das (4): gfs2: add more timing info to journal recovery process gfs2: changes to gfs2_log_XXX_bio gfs2: add a helper function to get_log_header that can be used elsewhere gfs2: read journal in large chunks to locate the head fs/gfs2/bmap.c | 8

[Cluster-devel] [GFS2 RFC PATCH 3/3] gfs2: introduce bio_pool to readahead journal to find jhead

2018-09-24 Thread Abhi Das
of order. This strict ordering allows us to determine the journal head without having to do extra reads. A tunable allows us to configure the size of the bio_pool. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 3 + fs/gfs2/lops.c | 359

[Cluster-devel] [GFS2 RFC PATCH 0/3] Locating jhead using a pool of bios

2018-09-24 Thread Abhi Das
bit of testing and it seems to be holding up so far. I plan to do more testing. I haven't done a performance analysis vs the old method yet, so I don't know how well this does. There might be some optimizations we can do w.r.t repeated allocations and such. Abhi Das (3): gfs2: add more timing info

[Cluster-devel] [GFS2 RFC PATCH 1/3] gfs2: add more timing info to the journal recovery process

2018-09-24 Thread Abhi Das
Time the gfs2_map_journal_extents() function and the journal head lookup and report. Signed-off-by: Abhi Das --- fs/gfs2/bmap.c | 8 ++-- fs/gfs2/recovery.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 03128ed..dddb5a4

[Cluster-devel] [GFS2 RFC PATCH 2/3] gfs2: add a helper function to get_log_header that can be used elsewhere

2018-09-24 Thread Abhi Das
Move and re-order the error checks and hash/crc computations into another function __get_log_header() so it can be used in scenarios where buffer_heads are not being used for the log header. Signed-off-by: Abhi Das --- fs/gfs2/recovery.c | 53

[Cluster-devel] [GFS2 v2 PATCH 2/4] gfs2: changes to gfs2_log_XXX_bio

2018-09-10 Thread Abhi Das
Change gfs2_log_XXX_bio family of functions so they can be used with read operations also. This patch also contains some clean up and coalescing of the above functions suggested by Andreas. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher --- fs/gfs2/log.c | 4 +-- fs/gfs2/lops.c

[Cluster-devel] [GFS2 v2 PATCH 3/4] gfs2: add a helper function to get_log_header that can be used elsewhere

2018-09-10 Thread Abhi Das
Move and re-order the error checks and hash/crc computations into another function __get_log_header() so it can be used in scenarios where buffer_heads are not being used for the log header. Signed-off-by: Abhi Das --- fs/gfs2/recovery.c | 53

[Cluster-devel] [GFS2 v2 PATCH 1/4] gfs2: add timing info to map_journal_extents

2018-09-10 Thread Abhi Das
Tells you how many milliseconds map_journal_extents takes. Signed-off-by: Abhi Das --- fs/gfs2/bmap.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 03128ed..dddb5a4 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -14,6

[Cluster-devel] [GFS2 v2 PATCH 4/4] gfs2: read journal in large chunks to locate the head

2018-09-10 Thread Abhi Das
Use bio(s) to read in the journal sequentially in large chunks and locate the head of the journal. This is faster in most cases when compared to the existing bisect method which operates one block at a time. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 8 +++- fs/gfs2/lops.c | 96

[Cluster-devel] [GFS2 PATCH 3/4] gfs2: add a helper function to get_log_header that can be used elsewhere

2018-09-06 Thread Abhi Das
Move and re-order the error checks and hash/crc computations into another function __get_log_header() so it can be used in scenarios where buffer_heads are not being used for the log header. Signed-off-by: Abhi Das --- fs/gfs2/recovery.c | 53

[Cluster-devel] [GFS2 PATCH 2/4] gfs2: changes to gfs2_log_XXX_bio

2018-09-06 Thread Abhi Das
Change gfs2_log_flush_bio to accept a pointer to the struct bio* to be flushed. Change gfs2_log_alloc_bio and gfs2_log_get_bio to take a struct gfs2_jdesc* instead of gfs2_sbd. Signed-off-by: Abhi Das --- fs/gfs2/log.c | 4 ++-- fs/gfs2/lops.c | 34 +++--- fs/gfs2

[Cluster-devel] [GFS2 PATCH 4/4] gfs2: read journal in large chunks to locate the head

2018-09-06 Thread Abhi Das
Use bio(s) to read in the journal sequentially in large chunks and locate the head of the journal. This is faster in most cases when compared to the existing bisect method which operates one block at a time. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 8 +++- fs/gfs2/lops.c | 122

[Cluster-devel] [GFS2 PATCH 1/4] gfs2: add timing info to map_journal_extents

2018-09-06 Thread Abhi Das
Tells you how many milliseconds map_journal_extents takes. Signed-off-by: Abhi Das --- fs/gfs2/bmap.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 03128ed..dddb5a4 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -14,6

[Cluster-devel] [GFS2 PATCH 0/4] Speed up journal head lookup

2018-09-06 Thread Abhi Das
This is the upstream version of the rhel7 patchset I'd posted earlier for review. It is slightly different in parts owing to some bits already being present and the hash/crc computation code being different due to the updated log header structure. Cheers! --Abhi *** BLURB HERE *** Abhi Das (4

[Cluster-devel] [GFS2 PATCH] gfs2: getlabel support

2018-08-20 Thread Abhi Das
Add support for the GETFSLABEL ioctl in gfs2. I tested this patch and it works as expected. Signed-off-by: Steve Whitehouse Tested-by: Abhi Das --- fs/gfs2/file.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 08369c6..6510f4e 100644

[Cluster-devel] [RFC v2 PATCH 1/5] gfs2: allow map_journal_extents() to take a journal descriptor as argument

2018-08-12 Thread Abhi Das
This function now maps the extents for the journal whose descriptor is passed in as argument. Signed-off-by: Abhi Das --- fs/gfs2/log.h| 1 + fs/gfs2/ops_fstype.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h index 92dcbe7

[Cluster-devel] [RFC v2 PATCH 2/5] gfs2: add timing info for various stages of journal recovery

2018-08-12 Thread Abhi Das
Tells you how many milliseconds each stage of journal recovery takes. Signed-off-by: Abhi Das --- fs/gfs2/ops_fstype.c | 5 + fs/gfs2/recovery.c | 20 ++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index

[Cluster-devel] [RFC v2 PATCH 3/5] gfs2: changes to gfs2_log_XXX_bio

2018-08-12 Thread Abhi Das
Change gfs2_log_flush_bio to accept a pointer to the struct bio to be flushed. Change gfs2_log_alloc_bio and gfs2_log_get_bio to take a struct gfs2_jdesc instead of gfs2_sbd. Signed-off-by: Abhi Das --- fs/gfs2/log.c | 4 ++-- fs/gfs2/lops.c | 32 ++-- fs/gfs2

[Cluster-devel] [RFC v2 PATCH 0/5] Speed up journal head lookup

2018-08-12 Thread Abhi Das
on the latest RHEL7 codebase as it is easier for me to test. Upstream version shouldn't be very dissimilar and I'll post the upstream port if it looks good. I'll do a bit more testing and report some performance numbers shortly. Cheers! --Abhi Abhi Das (5): gfs2: allow map_journal_extents() to take

[Cluster-devel] [RFC v2 PATCH 4/5] gfs2: read journal in large chunks to locate the head

2018-08-12 Thread Abhi Das
Use bio(s) to read in the journal sequentially in large chunks and locate the head of the journal. This is faster in most cases when compared to the existing bisect method which operates one block at a time. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 8 +++- fs/gfs2/lops.c | 121

[Cluster-devel] [RFC v2 PATCH 5/5] gfs2: add tracepoint debugging for gfs2_end_log_read

2018-08-12 Thread Abhi Das
Use a tracepoint and a counter in gfs2_jdesc to count the number of outstanding reads (in pages) as we read through a journal to aid debugging. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 1 + fs/gfs2/lops.c | 3 +++ fs/gfs2/ops_fstype.c | 1 + fs/gfs2/trace_gfs2.h | 25

[Cluster-devel] [PATCH v3 1/2] gfs2: Pass write offset to gfs2_write_calc_reserv

2018-07-18 Thread Abhi Das
Pass the offset of the write to gfs2_write_calc_reserv so that we can then compute a better upper bound of the number of indirect blocks required. Fixed comments in quota.c:do_sync() to better explain block reservation calculation for quotas. Signed-off-by: Andreas Gruenbacher Acked-by: Abhi

[Cluster-devel] [RFC PATCH 2/3] gfs2: add timing info for various stages of journal recovery

2018-05-29 Thread Abhi Das
Tells you how many milliseconds each stage of journal recovery takes. Signed-off-by: Abhi Das --- fs/gfs2/ops_fstype.c | 5 + fs/gfs2/recovery.c | 20 ++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index

[Cluster-devel] [RFC PATCH 3/3] gfs2: read journal in large chunks to locate the head

2018-05-29 Thread Abhi Das
Use bio(s) to read in the journal sequentially in large chunks and locate the head of the journal. This is faster in most cases when compared to the existing bisect method which operates one block at a time. Signed-off-by: Abhi Das --- fs/gfs2/incore.h | 7 +++- fs/gfs2/log.c | 2

[Cluster-devel] [RFC PATCH 1/3] gfs2: allow map_journal_extents() to take a journal descriptor as argument

2018-05-29 Thread Abhi Das
This function now maps the extents for the journal whose descriptor is passed in as argument. Signed-off-by: Abhi Das --- fs/gfs2/log.h| 1 + fs/gfs2/ops_fstype.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h index 92dcbe7

[Cluster-devel] [PATCH] gfs2: time journal recovery steps accurately

2018-03-29 Thread Abhi Das
This patch spits out the time taken by the various steps in the journal recover process. Previously, the journal recovery time didn't account for finding the journal head in the log which takes up a significant portion of time. Signed-off-by: Abhi Das <a...@redhat.com> --- fs/gfs2/reco

[Cluster-devel] [GFS2 PATCH] gfs2: Remove inode from ordered write list in gfs2_write_inode()

2018-01-28 Thread Abhi Das
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 time to remove such inodes from our ordered write list so they don't hang around for long periods of time. Signed-off-by: Abhi Das <a...@redhat.

[Cluster-devel] [RFC RHEL7 GFS2 PATCH 2/3] gfs2: try to free empty mapping inodes from ordered list

2017-12-12 Thread Abhi Das
Add a new function gfs2_ordered_shrink() that is called when syncfs is run. This function runs through the ordered list of inodes and removes the ones that don't have any pages in need of writing. Signed-off-by: Abhi Das <a...@redhat.com> --- fs/gfs2/log.c | 16 fs/gfs2

[Cluster-devel] [RFC RHEL7 GFS2 PATCH 3/3] gfs2: ordered write list addendum patch

2017-12-12 Thread Abhi Das
Trim the list in gfs2_ordered_write() as we run through it to write out inodes. Also attempt to remove an inode from the list after it is fsync'ed. Finally, call gfs2_ordered_write() in case we were not able to shrink the list in gfs2_ordered_shrink() in the hopes that it will eventually cause the

[Cluster-devel] [RFC RHEL7 GFS2 PATCH 1/3] gfs2: ordered list instrumentation

2017-12-12 Thread Abhi Das
Keep stats on the size of the ordered list and keep track of where it's added to and removed from --- fs/gfs2/bmap.c | 2 +- fs/gfs2/file.c | 2 +- fs/gfs2/incore.h | 12 fs/gfs2/log.c| 7 +-- fs/gfs2/log.h| 35

[Cluster-devel] [RFC RHEL7 GFS2 PATCH 0/3] Trimming the ordered write inode list

2017-12-12 Thread Abhi Das
of the ordered list. That way, we can call it to write a percentage (or N inodes), wait for the writes to complete and then remove those inodes from the list. Abhi Das (3): gfs2: ordered list instrumentation gfs2: try to free empty mapping inodes from ordered list gfs2: ordered write list

[Cluster-devel] [PATCH] gfs2: forcibly flush ail to relieve memory pressure

2017-08-04 Thread Abhi Das
to write anything. This is a good indication that the ail might be holding some dirty pages. Resolves: rhbz#1389079 Signed-off-by: Abhi Das <a...@redhat.com> --- fs/gfs2/aops.c | 14 +- fs/gfs2/incore.h | 1 + fs/gfs2/log.c| 4 3 files changed, 18 insertions(+), 1 de

[Cluster-devel] [PATCH] fs: Do not check for valid page->mapping in page_cache_pipe_buf_confirm

2016-05-25 Thread Abhi Das
or return error in this case. Signed-off-by: Abhi Das <a...@redhat.com> CC: Miklos Szeredi <mszer...@redhat.com> CC: Jens Axboe <ax...@fb.com> CC: Al Viro <v...@zeniv.linux.org.uk> --- fs/splice.c | 9 - 1 file changed, 9 deletions(-) diff --git a/fs/splice.c b/f

[Cluster-devel] [GFS2 PATCH] gfs2: Use gfs2 wrapper to sync inode before calling generic_file_splice_read()

2016-03-29 Thread Abhi Das
gfs2_file_splice_read() f_op grabs and releases the cluster-wide inode glock to sync the inode size to the latest. Without this, generic_file_splice_read() uses an older i_size value and can return EOF for valid offsets in the inode. Resolves: rhbz#1300756 Signed-off-by: Abhi Das

[Cluster-devel] [GFS2 PATCH] gfs2: Automatically set GFS2_DIF_SYSTEM flag on system files

2015-10-30 Thread Abhi Das
in the metafs whose GFS2_DIF_SYSTEM flag has already been set (most likely by a previous mkfs.gfs2) Resolves: rhbz#1272086 Signed-off-by: Abhi Das <a...@redhat.com> --- fs/gfs2/file.c | 4 ++-- fs/gfs2/inode.c | 5 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/f

[Cluster-devel] [GFS2 PATCH] gfs2: allow userspace to set GFS2_DIF_SYSTEM using FS_RESERVED_FL

2015-10-23 Thread Abhi Das
Repurpose the existing VFS FS_RESERVED_FL flag to set GFS2_DIF_SYSTEM using the FS_IOC_SETFLAGS ioctl. Resolves: rhbz#1272086 Signed-off-by: Abhi Das <a...@redhat.com> --- fs/gfs2/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 71cd138..e

[Cluster-devel] [GFS2] gfs2-utils: make gfs2_jadd set GFS2_DIF_SYSTEM flag on system inodes

2015-10-23 Thread Abhi Das
-by: Abhi Das <a...@redhat.com> --- gfs2/mkfs/main_jadd.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c index de5d9c5..538d820 100644 --- a/gfs2/mkfs/main_jadd.c +++ b/gfs2/mkfs/main_jadd.c @@ -274,7 +274,7 @@ static void

[Cluster-devel] [GFS2 PATCH] gfs2: s64 cast for negative quota value

2015-06-08 Thread Abhi Das
One-line fix to cast quota value to s64 before comparison. By default the quantity is treated as u64. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index dcd598a..c2607a2 100644

[Cluster-devel] [GFS2 PATCH] gfs2: Don't support fallocate on jdata files

2015-06-03 Thread Abhi Das
We cannot provide an efficient implementation due to the headers on the data blocks, so there doesn't seem much point in having it. Resolves: rhbz#1221331 Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/file.c

[Cluster-devel] [GFS2 v2 PATCH 2/2] gfs2: limit quota log messages

2015-06-01 Thread Abhi Das
. In theory, this could get out of hand and flood the log and the filesystem hosting the log files. Resolves: rhbz#1174295 Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/incore.h | 1 + fs/gfs2/quota.c | 15 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/fs

[Cluster-devel] [GFS2 v2 PATCH 0/2] More quota fixes

2015-06-01 Thread Abhi Das
This is a follow-up set of patches to fix the issues discovered during testing of my previous set that reworked significant portions of the quota code. Also addresses some of the fixes Bob suggested earlier. Abhi Das (2): gfs2: fix quota updates on block boundaries gfs2: limit quota log

[Cluster-devel] [GFS2 v2 PATCH 1/2] gfs2: fix quota updates on block boundaries

2015-06-01 Thread Abhi Das
. This patch also adds a (s64) cast that was missing in a call to gfs2_quota_change() in inode.c Resolves: rhbz#1174295 Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/inode.c | 2 +- fs/gfs2/quota.c | 197 +--- 2 files changed, 119

[Cluster-devel] [GFS2 PATCH 2/2] gfs2: limit quota log messages

2015-05-31 Thread Abhi Das
. In theory, this could get out of hand and flood the log and the filesystem hosting the log files. Resolves: rhbz#1174295 Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/incore.h | 1 + fs/gfs2/quota.c | 13 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/fs

[Cluster-devel] [GFS2 PATCH 0/2] More quota fixes

2015-05-31 Thread Abhi Das
This is a follow-up set of patches to fix the issues discovered during testing of my previous set that reworked significant portions of the quota code. Abhi Das (2): gfs2: fix quota updates on block boundaries gfs2: limit quota log messages fs/gfs2/incore.h | 1 + fs/gfs2/inode.c | 2

[Cluster-devel] [GFS2] gfs2: handle NULL rgd in set_rgrp_preferences

2015-05-05 Thread Abhi Das
)... that would cause unintended consequences and infinite loops.) Resolves: rhbz#1211663 Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/rgrp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index cb27065..900e515 100644 --- a/fs/gfs2

[Cluster-devel] [GFS2] fsck.gfs2: replace recent i_goal fixes with simple logic

2015-04-15 Thread Abhi Das
approach. It checks if the i_goal of a given inode is out of bounds of the fs. If so, we can be certain that it is wrong and we set it to the inode metadata block. This is a safe starting point for gfs2 to determine where to allocate from next. Resolves: rhbz#1186515 Signed-off-by: Abhi Das

[Cluster-devel] [GFS2] gfs2: fix quota refresh race in do_glock()

2015-04-07 Thread Abhi Das
in miscalculations. This patch fixes this race by moving the check for the QDF_REFRESH flag check further out into the gfs2_quota_lock() process, i.e, in do_glock(), under the protection of the quota glock. Resolves: rhbz#1174295 Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/quota.c | 8

[Cluster-devel] gfs2-utils: more fsck.gfs2 i_goal fixes

2015-04-01 Thread Abhi Das
directories alone. This patch simply skips over directories whose goal blocks fall within the boundaries of the fs, assuming they are valid. Resolves: rhbz#1186515 Signed-off-by: Abhi Das a...@redhat.com --- gfs2/fsck/metawalk.c | 8 1 file changed, 8 insertions(+) diff --git a/gfs2/fsck

[Cluster-devel] gfs2_utils: more gfs2_convert i_goal fixes

2015-04-01 Thread Abhi Das
The correct goal was only being set on files that are = meta height 2. This patch fixes this and sets correct goal values for stuffed, height 1 and jdata files as well Resolves: rhbz#1186847 Signed-off-by: Abhi Das a...@redhat.com --- gfs2/convert/gfs2_convert.c | 18 -- 1 file

[Cluster-devel] [GFS2 3/3] gfs2: allow fallocate to max out quotas/fs efficiently

2015-03-18 Thread Abhi Das
available to us, we can compute how many bytes of data can be written using those blocks instead of guessing inefficiently. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/file.c | 70 +++--- 1 file changed, 47 insertions(+), 23 deletions

[Cluster-devel] [GFS2 2/3] gfs2: allow quota_check and inplace_reserve to return available blocks

2015-03-18 Thread Abhi Das
. The assumption is that the caller is ok with just 'min_target' blocks and will likely proceed with allocating them. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/incore.h | 2 ++ fs/gfs2/quota.c | 52 +++- fs/gfs2/rgrp.c | 20

[Cluster-devel] [GFS2 3/3] gfs2: allow fallocate to max out quotas/fs efficiently

2015-02-24 Thread Abhi Das
available to us, we can compute how many bytes of data can be written using those blocks instead of guessing inefficiently. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/file.c | 64 +- 1 file changed, 45 insertions(+), 19 deletions

[Cluster-devel] [GFS2 2/3] gfs2: allow quota_check and inplace_reserve to return available blocks

2015-02-24 Thread Abhi Das
of free blocks in that rgrp. If not, -ENOSPC is returned and 'allowed' is set to the maximum number of free blocks that were found in any rgrp. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/incore.h | 1 + fs/gfs2/quota.c | 34 +++--- fs/gfs2/rgrp.c | 12

[Cluster-devel] [GFS2 0/3] fallocate and quota fixes

2015-02-24 Thread Abhi Das
some basic tests and things seem to be holding up. The failing case in bz1174295 is fixed using this patchset. I'll do test build and pass it on to Nate to test with. Abhi Das (3): gfs2: perform quota checks against allocation parameters gfs2: allow quota_check and inplace_reserve to return

[Cluster-devel] [GFS2 PATCH 3/3] gfs2: allow fallocate to max out quotas/fs efficiently

2015-02-16 Thread Abhi Das
available instead of guessing, we can max out quotas or the filesystem efficiently. Bear in mind that this applies only when the requested fallocate operation would otherwise error out with -EDQUOT or -ENOSPC without utilizing all the blocks that might still be available. Signed-off-by: Abhi Das

[Cluster-devel] [GFS2 PATCH 1/3] gfs2: perform quota checks against allocation parameters

2015-02-16 Thread Abhi Das
of blocks at once) the quota excess is non-trivial and is addressed by this patch. Resolves: rhbz#1174295 Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/aops.c | 6 +++--- fs/gfs2/bmap.c | 2 +- fs/gfs2/file.c | 9 + fs/gfs2/incore.h | 2 +- fs/gfs2/inode.c | 18

[Cluster-devel] [GFS2 PATCH 0/3] fallocate quota fixes

2015-02-16 Thread Abhi Das
-EDQUOT/-ENOSPC and leaving some available blocks unallocated. Abhi Das (3): gfs2: perform quota checks against allocation parameters gfs2: allow quota_check and inplace_reserve to return available blocks gfs2: allow fallocate to max out quotas/fs efficiently fs/gfs2/aops.c | 6

[Cluster-devel] [GFS2 PATCH 2/3] gfs2: allow quota_check and inplace_reserve to return available blocks

2015-02-16 Thread Abhi Das
likely to fail. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/incore.h | 1 + fs/gfs2/quota.c | 15 +++ fs/gfs2/rgrp.c | 8 +++- fs/gfs2/rgrp.h | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 3a4ea50

[Cluster-devel] [GFS2 PATCH 3/4] gfs2: add new function gfs2_inpl_rsrv_ret_max_avl

2015-02-12 Thread Abhi Das
'max_avail'. If acceptable to the caller logic, either of these inplace resreve functions may be called again requesting 'max_avail' blocks to avoid the -ENOSPC error. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/rgrp.c | 13 +++-- fs/gfs2/rgrp.h | 10 +- 2 files changed, 20

[Cluster-devel] [GFS2 PATCH 0/4] fallocate quota fixes

2015-02-12 Thread Abhi Das
/-ENOSPC and leaving some available blocks unallocated. Abhi Das (4): gfs2: check quota for blocks we're about to allocate gfs2: add new quota check functions gfs2: add new function gfs2_inpl_rsrv_ret_max_avl gfs2: allow fallocate to max out quotas/fs efficiently fs/gfs2/aops.c | 6

[Cluster-devel] [GFS2 PATCH 4/4] gfs2: allow fallocate to max out quotas/fs efficiently

2015-02-12 Thread Abhi Das
or the filesystem efficiently. Bear in mind that this applies only when the requested fallocate operation would otherwise error out with -EDQUOT or -ENOSPC without utilizing all the blocks that might still be available. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/file.c | 24

[Cluster-devel] [GFS2 PATCH 1/4] gfs2: check quota for blocks we're about to allocate

2015-02-12 Thread Abhi Das
to the current usage and check the sum against the quota warns and limits and fail the operation if necessary. Resolves: rhbz#1174295 Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/aops.c | 6 +++--- fs/gfs2/bmap.c | 2 +- fs/gfs2/file.c | 8 fs/gfs2/inode.c | 14 -- fs

[Cluster-devel] [GFS2 PATCH 2/4] gfs2: add new quota check functions

2015-02-12 Thread Abhi Das
parameter 'allow' If acceptable to the caller logic, any of the quota_check functions may be called again with the 'allow'ed blocks to try and avoid a quota violation. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/quota.c | 24 fs/gfs2/quota.h | 20

[Cluster-devel] [GFS2] fsck.gfs2: addendum to fix broken i_goal values in inodes

2015-01-15 Thread Abhi Das
This patch moves some code around and fixes some corner cases that the previous patches did not address. This patch also fixes some trailing whitespace and removes a test that is no longer valid from test/fsck.at Resolves: rhbz#1149516 Signed-off-by: Abhi Das a...@redhat.com --- gfs2/fsck

[Cluster-devel] [GFS2 PATCH] gfs2: fix bad inode i_goal values during block allocation

2014-09-18 Thread Abhi Das
and so, the fix in gfs2_inplace_reserve() as per 1) won't work in this scenario. We need to catch and fix it sooner in the parent dir itself (gfs2_create_inode()), before it is copied to the new inode. Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/inode.c | 1 + fs/gfs2/rgrp.c | 8 fs

[Cluster-devel] [GFS2 PATCH] GFS2: check and correct zero i_goal

2014-09-11 Thread Abhi Das
starting point for the allocation logic to find the next available block. Resolves: rhbz#1130684 Signed-off-by: Abhi Das a...@redhat.com --- fs/gfs2/glops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 2ffc67d..799427b 100644 --- a/fs/gfs2/glops.c +++ b

[Cluster-devel] [GFS2 PATCH] gfs2: Fix uninitialized VFS inode in gfs2_create_inode

2014-03-31 Thread Abhi Das
-by: Abhi Das a...@redhat.com --- fs/gfs2/incore.h | 1 + fs/gfs2/inode.c | 11 ++- fs/gfs2/super.c | 7 ++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index ef26ed9..bdf70c1 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h

[Cluster-devel] [PATCH 2/2] gfs2-utils: check and fix bad dinode pointers in gfs1 sb

2014-03-11 Thread Abhi Das
This patch makes gfs2_convert check for bad values of sb_seg_size, sb_quota_di and sb_license_di. In fsck.gfs2, attempts are made to correct these erroneous values. Resolves: rhbz#1053668 Signed-off-by: Abhi Das a...@redhat.com --- gfs2/convert/gfs2_convert.c | 29 ++ gfs2/fsck

[Cluster-devel] [PATCH 0/2] gfs1 convert/fsck fixes

2014-03-11 Thread Abhi Das
These two patches fix bugs identified during recent convert/fsck tests on gfs1 filesystems. Abhi Das (2): libgfs2: patch to update gfs1 superblock correctly gfs2-utils: check and fix bad dinode pointers in gfs1 sb gfs2/convert/gfs2_convert.c | 29 ++ gfs2/fsck/initialize.c