[Cluster-devel] [PATCH 1/2] libgfs2: patch to update gfs1 superblock correctly

2014-03-11 Thread Abhi Das
causing corruption. This patch fixes gfs2_sb_out() to write out the padded fields. Resolves: rhbz#1053668 Signed-off-by: Abhi Das --- gfs2/libgfs2/ondisk.c | 5 + 1 file changed, 5 insertions(+) diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c index dcc537e..3fbc63f 100644 --- a/gfs2

[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 --- gfs2/convert/gfs2_convert.c | 29 ++ gfs2/fsck/initialize.c

[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

[Cluster-devel] [GFS2 PATCH] GFS2: check NULL return value in gfs2_ok_to_move

2014-03-12 Thread Abhi Das
gfs2_lookupi() can return NULL if the path to the root is broken by another rename/rmdir. In this case gfs2_ok_to_move() must check for this NULL pointer and return error. Resolves: rhbz#1060246 Signed-off-by: Abhi Das --- fs/gfs2/inode.c | 4 1 file changed, 4 insertions(+) diff --git a

[Cluster-devel] [GFS2 PATCH] gfs2: Trim the ordered write list in gfs2_ordered_write()

2017-12-21 Thread 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 --- fs/gfs2/log.c | 7 +-- 1 file changed, 5 insertions(+), 2

[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 --- fs/gfs2/su

[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 --- fs/gfs2/recovery.c

[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] [RFC PATCH 0/3] Speed up journal head lookup

2018-05-29 Thread Abhi Das
621233 | 554 524 Abhi Das (3): gfs2: allow map_journal_extents() to take a journal descriptor as argument gfs2: add timing info for various stages of journal recovery gfs2: read journal in large chunks to locate the head fs/gfs2/incore.h | 7 ++- fs/gfs2/log.c

[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] [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 v2 PATCH 0/5] Speed up journal head lookup

2018-08-12 Thread Abhi Das
is based 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 m

[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] [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] [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] [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 D

[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 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 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 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 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 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 0/4] Speed up journal head lookup

2018-09-10 Thread Abhi Das
code being different due to the updated log header structure. Cheers! --Abhi Abhi Das (4): gfs2: add timing info to map_journal_extents 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 locat

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

2018-09-24 Thread Abhi Das
e a little 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:

[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 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 PATCH 0/4] jhead lookup using bios

2018-10-15 Thread Abhi Das
xfstests 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

[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 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 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] 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] [PATCH] gfs2: fix race between gfs2_freeze_func and unmount

2019-04-30 Thread Abhi Das
o 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 a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 78c8e761b321..b15755068593 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs

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

2019-04-30 Thread Abhi Das
for a more 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(-)

[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] [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] [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] [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] [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 stat

[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 cb2a11b

[Cluster-devel] [GFS2 PATCH] gfs2: Fix return value in slot_get()

2014-03-30 Thread Abhi Das
ENOSPC was being returned in slot_get inspite of successful execution of the function. This patch fixes this return code. Signed-off-by: Abhi Das --- fs/gfs2/quota.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 27f9435..c4e 100644 --- a/fs/gfs2

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

2014-03-31 Thread Abhi Das
: Abhi Das --- 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 @@ -371,6 +371,7

[Cluster-devel] [GFS2 PATCH] gfs2: quotas not being refreshed in gfs2_adjust_quota

2014-04-16 Thread Abhi Das
Old values of user quota limits were being used and could allow users to exceed their allotted quotas. This patch refreshes the limits to the latest values so that quotas are enforced correctly. Resolves: rhbz#1077463 Signed-off-by: Abhi Das --- fs/gfs2/quota.c | 1 + 1 file changed, 1

[Cluster-devel] [RFC PATCH 0/2] dirreadahead system call

2014-07-25 Thread Abhi Das
dahead can resume at the right location. Returns 0 when there are no more entries left. Abhi Das (2): fs: Add dirreadahead syscall and VFS hooks gfs2: GFS2's implementation of the dir_readahead file operation arch/x86/syscalls/syscall_32.tbl | 1 + arch/x86/syscalls/sysca

[Cluster-devel] [RFC PATCH 2/2] gfs2: GFS2's implementation of the dir_readahead file operation

2014-07-25 Thread Abhi Das
this stage. Subsequent getdents calls on the directory and stat calls on the inodes will have the time-consuming lookups already done for them and will therefore be quick. Signed-off-by: Abhi Das --- fs/gfs2/Makefile| 3 +- fs/gfs2/dir.c | 49 +--- fs/gfs2/dir.h

[Cluster-devel] [RFC PATCH 1/2] fs: Add dirreadahead syscall and VFS hooks

2014-07-25 Thread Abhi Das
Also adds a void *opaque field to struct dir_context that can be used by filesystems to temporarily store any context as this struct gets passed around in the fs. Signed-off-by: Abhi Das --- arch/x86/syscalls/syscall_32.tbl | 1 + arch/x86/syscalls/syscall_64.tbl | 1 + fs/readdir.c

[Cluster-devel] [RFC PATCH 1/5] fs: xstat system call VFS bits

2014-07-25 Thread Abhi Das
This patch adds the VFS bits of the xstat patchset by David Howells. The xgetdents syscall uses this to obtain stat information for directory entries. Signed-off-by: Abhi Das --- arch/x86/syscalls/syscall_32.tbl | 2 + arch/x86/syscalls/syscall_64.tbl | 2 + fs/stat.c

[Cluster-devel] [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions

2014-07-25 Thread Abhi Das
return to the user. Signed-off-by: Abhi Das --- fs/gfs2/Makefile |3 +- fs/gfs2/dir.c| 80 ++-- fs/gfs2/dir.h| 13 +- fs/gfs2/export.c |2 +- fs/gfs2/file.c | 17 +- fs/gfs2/incore.h |6 + fs/gfs2/inode.c |3 +- fs/gfs2/inode.h

[Cluster-devel] [RFC PATCH 3/5] gfs2: Add a dynamic buffer backed by a vector of pages

2014-07-25 Thread Abhi Das
This patch adds a new buffer called 'vbuf' that is backed by a vector of pages. It is dynamic and can be expanded as needed with low overhead. Signed-off-by: Abhi Das --- fs/gfs2/util.c | 299 + fs/gfs2/util.h | 43

[Cluster-devel] [RFC PATCH 0/5] xgetdents system call

2014-07-25 Thread Abhi Das
and xattr information for each entry as requested and return all the data back to the user in a container structure (linux_xdirent) as part of the supplied user buffer. Abhi Das (5): fs: xstat system call VFS bits fs: Add xgetdents system call and xreaddir file operation gfs2: Add a dynamic

[Cluster-devel] [RFC PATCH 2/5] fs: Add xgetdents system call and xreaddir file operation

2014-07-25 Thread Abhi Das
Also add linux_xdirent structure that will be the container for dirent, stat and xattr info. Signed-off-by: Abhi Das --- arch/x86/syscalls/syscall_32.tbl | 1 + arch/x86/syscalls/syscall_64.tbl | 1 + fs/readdir.c | 42 fs/stat.c

[Cluster-devel] [RFC PATCH 4/5] gfs2: Add sort functionality with extra parameter

2014-07-25 Thread Abhi Das
This is essentially a copy of the sort function and its helpers from lib/sort.c with the exception of an additional 'void *opaque' parameter added here. custom cmp_func and swap_func functions can make use of the opaque field for relevant context Signed-off-by: Abhi Das --- fs/gfs2/u

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

2014-09-11 Thread Abhi Das
onable starting point for the allocation logic to find the next available block. Resolves: rhbz#1130684 Signed-off-by: Abhi Das --- 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/f

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

2014-09-18 Thread Abhi Das
dr field is invalid 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 --- fs/gfs2/inode.c | 1 + fs/gfs2/rgrp.c | 8

[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 --- gfs2/fsck/metawalk.c | 70

[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 --- fs/gfs2/rgrp.c | 13 +++-- fs/gfs2/rgrp.h | 10 +- 2 files changed,

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

2015-02-12 Thread Abhi Das
DQUOT/-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/ao

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

2015-02-12 Thread Abhi Das
uotas 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 --- 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
number 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 --- fs/gfs2/aops.c | 6 +++--- fs/gfs2/bmap.c | 2 +- fs/gfs2/file.c | 8 fs/gfs2/inode.c | 14 -- fs/gf

[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 --- fs/gfs2/quota.c | 24 fs/gfs2/quota.h | 20 +

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

2015-02-16 Thread Abhi Das
t's 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:

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

2015-02-16 Thread Abhi Das
nch of blocks at once) the quota excess is non-trivial and is addressed by this patch. Resolves: rhbz#1174295 Signed-off-by: Abhi Das --- 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 ++ fs/g

[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
lue set as ap->target is less likely to fail. Signed-off-by: Abhi Das --- 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 in

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

2015-02-24 Thread Abhi Das
ed number of free blocks, 'allowed' is set to the total number 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 --- fs/gfs2/incore.h | 1 + fs/gfs2/quota.

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

2015-02-24 Thread Abhi Das
I've run 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 inpla

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

2015-02-24 Thread Abhi Das
cks 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 --- fs/gfs2/file.c | 64 +- 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a

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

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

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

2015-03-18 Thread Abhi Das
hset. 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 available blocks gfs2: allow fallocate to max out quotas/fs efficiently fs/gfs2/aops.c | 6 ++---

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

2015-03-18 Thread Abhi Das
min_target' blocks allowable/available. 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 --- fs/gfs2/incore.h | 2 ++ fs/gfs2/quota.c | 52 +++

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

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

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

2015-03-18 Thread Abhi Das
cks 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 --- fs/gfs2/file.c | 70 +++--- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a

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

2015-04-01 Thread Abhi Das
leave 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 --- gfs2/fsck/metawalk.c | 8 1 file changed, 8 insertions(+) diff --git a/gfs2/fsck/metawalk.c b/gfs2

[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 --- gfs2/convert/gfs2_convert.c | 18 -- 1 file changed,

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

2015-04-07 Thread Abhi Das
result 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 --- fs/gfs2/quota.c | 8 1 fi

[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: handle NULL rgd in set_rgrp_preferences

2015-05-05 Thread Abhi Das
rgrp)... that would cause unintended consequences and infinite loops.) Resolves: rhbz#1211663 Signed-off-by: Abhi Das --- 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/rgrp.c +++

[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 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 --- fs/gfs2/incore.h | 1 + fs/gfs2/quota.c | 13 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/incore.h b/fs

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

2015-05-31 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 --- fs/gfs2/inode.c | 2 +- fs/gfs2/quota.c | 197 +--- 2 files changed, 119 insertions(+), 80

[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 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 --- fs/gfs2/incore.h | 1 + fs/gfs2/quota.c | 15 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/incore.h b

[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 --- fs/gfs2/inode.c | 2 +- fs/gfs2/quota.c | 197 +--- 2 files changed, 119 insertions(+), 80

[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 --- fs/gfs2/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/file.c b/fs

[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 --- 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 --- a/fs/gfs2

[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 --- fs/gfs2/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 71cd138..ead0d0a 100644 --- a/fs

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

2015-10-23 Thread Abhi Das
: Abhi Das --- 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 add_ir(struct jadd_opts

[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 --- fs/gfs2/file.c | 4 ++-- fs/gfs2/inode.c | 5 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/file.c b/fs/gfs2

[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 --- fs/gfs2

[Cluster-devel] [GFS2 PATCH] gfs2: use inode_lock/unlock instead of accessing i_mutex directly

2016-05-01 Thread Abhi Das
i_mutex has been replaced by i_rwsem and directly accessing the non-existent i_mutex breaks the kernel build. Signed-off-by: Abhi Das CC: Stephen Rothwell CC: Al Viro --- fs/gfs2/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c

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

2016-05-25 Thread Abhi Das
y the buffer or return error in this case. Signed-off-by: Abhi Das CC: Miklos Szeredi CC: Jens Axboe CC: Al Viro --- fs/splice.c | 9 - 1 file changed, 9 deletions(-) diff --git a/fs/splice.c b/fs/splice.c index dd9bf7e..b9899b99 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -106,15 +

  1   2   >