* GFS2: Pre-pull patch posting (fixes)
@ 2009-07-30 13:45 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2009-07-30 13:45 UTC (permalink / raw)
To: cluster-devel, linux-kernel
Hi,
Here is the current content of the GFS2 -fixes git tree. Nothing
very exciting this time... some fixes for issues we've
had relating to flushing glocks/memory usage, plus a couple of
other fixes relating to statfs and the timely removal of inodes
which have been unlinked on a remote node,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2010-01-11 9:11 Steven Whitehouse
2010-01-11 9:11 ` [PATCH 1/4] GFS2: Ensure uptodate inode size when using O_APPEND Steven Whitehouse
0 siblings, 1 reply; 23+ messages in thread
From: Steven Whitehouse @ 2010-01-11 9:11 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Here are four small fixes for GFS2. Assuming that nobody spots
any errors, I'll be sending a pull request for these shortly,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/4] GFS2: Ensure uptodate inode size when using O_APPEND
2010-01-11 9:11 GFS2: Pre-pull patch posting (fixes) Steven Whitehouse
@ 2010-01-11 9:11 ` Steven Whitehouse
2010-01-11 9:11 ` [PATCH 2/4] GFS2: Fix locking bug in rename Steven Whitehouse
0 siblings, 1 reply; 23+ messages in thread
From: Steven Whitehouse @ 2010-01-11 9:11 UTC (permalink / raw)
To: linux-kernel, cluster-devel; +Cc: Steven Whitehouse
The VFS reads the inode size during generic_file_aio_write() but
with no locking around it. In order to get the expected result
from O_APPEND opens, this patch updated the inode size before
calling generic_file_aio_write()
There is of course still a race here, in that there is nothing to
prevent another node coming in and extending the file in the
mean time. On the other hand, when used with file locking this
will ensure that the expected results are obtained.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/file.c | 38 ++++++++++++++++++++++++++++++++++++--
1 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 4eb308a..a6abbae 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -569,6 +569,40 @@ static int gfs2_fsync(struct file *file, struct dentry *dentry, int datasync)
return ret;
}
+/**
+ * gfs2_file_aio_write - Perform a write to a file
+ * @iocb: The io context
+ * @iov: The data to write
+ * @nr_segs: Number of @iov segments
+ * @pos: The file position
+ *
+ * We have to do a lock/unlock here to refresh the inode size for
+ * O_APPEND writes, otherwise we can land up writing at the wrong
+ * offset. There is still a race, but provided the app is using its
+ * own file locking, this will make O_APPEND work as expected.
+ *
+ */
+
+static ssize_t gfs2_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
+ unsigned long nr_segs, loff_t pos)
+{
+ struct file *file = iocb->ki_filp;
+
+ if (file->f_flags & O_APPEND) {
+ struct dentry *dentry = file->f_dentry;
+ struct gfs2_inode *ip = GFS2_I(dentry->d_inode);
+ struct gfs2_holder gh;
+ int ret;
+
+ ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
+ if (ret)
+ return ret;
+ gfs2_glock_dq_uninit(&gh);
+ }
+
+ return generic_file_aio_write(iocb, iov, nr_segs, pos);
+}
+
#ifdef CONFIG_GFS2_FS_LOCKING_DLM
/**
@@ -711,7 +745,7 @@ const struct file_operations gfs2_file_fops = {
.read = do_sync_read,
.aio_read = generic_file_aio_read,
.write = do_sync_write,
- .aio_write = generic_file_aio_write,
+ .aio_write = gfs2_file_aio_write,
.unlocked_ioctl = gfs2_ioctl,
.mmap = gfs2_mmap,
.open = gfs2_open,
@@ -741,7 +775,7 @@ const struct file_operations gfs2_file_fops_nolock = {
.read = do_sync_read,
.aio_read = generic_file_aio_read,
.write = do_sync_write,
- .aio_write = generic_file_aio_write,
+ .aio_write = gfs2_file_aio_write,
.unlocked_ioctl = gfs2_ioctl,
.mmap = gfs2_mmap,
.open = gfs2_open,
--
1.6.2.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 2/4] GFS2: Fix locking bug in rename
2010-01-11 9:11 ` [PATCH 1/4] GFS2: Ensure uptodate inode size when using O_APPEND Steven Whitehouse
@ 2010-01-11 9:11 ` Steven Whitehouse
2010-01-11 9:11 ` [PATCH 3/4] GFS2: Fix gfs2_xattr_acl_chmod() Steven Whitehouse
0 siblings, 1 reply; 23+ messages in thread
From: Steven Whitehouse @ 2010-01-11 9:11 UTC (permalink / raw)
To: linux-kernel, cluster-devel; +Cc: Steven Whitehouse
The rename code was taking a resource group lock in cases where
it wasn't actually needed, this caused problems if the rename
was resulting in an inode being unlinked. The patch ensures that
we only take the rgrp lock early if it is really needed.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/ops_inode.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
index 247436c..78f73ca 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -748,7 +748,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
struct gfs2_rgrpd *nrgd;
unsigned int num_gh;
int dir_rename = 0;
- int alloc_required;
+ int alloc_required = 0;
unsigned int x;
int error;
@@ -867,7 +867,9 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
goto out_gunlock;
}
- alloc_required = error = gfs2_diradd_alloc_required(ndir, &ndentry->d_name);
+ if (nip == NULL)
+ alloc_required = gfs2_diradd_alloc_required(ndir, &ndentry->d_name);
+ error = alloc_required;
if (error < 0)
goto out_gunlock;
error = 0;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 3/4] GFS2: Fix gfs2_xattr_acl_chmod()
2010-01-11 9:11 ` [PATCH 2/4] GFS2: Fix locking bug in rename Steven Whitehouse
@ 2010-01-11 9:11 ` Steven Whitehouse
2010-01-11 9:11 ` [PATCH 4/4] GFS2: Use MAX_LFS_FILESIZE for meta inode size Steven Whitehouse
0 siblings, 1 reply; 23+ messages in thread
From: Steven Whitehouse @ 2010-01-11 9:11 UTC (permalink / raw)
To: linux-kernel, cluster-devel; +Cc: Steven Whitehouse
The ref counting for the bh returned by gfs2_ea_find() was
wrong. This patch ensures that we always drop the ref count
to that bh correctly.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/xattr.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c
index 8a04108..c2ebdf2 100644
--- a/fs/gfs2/xattr.c
+++ b/fs/gfs2/xattr.c
@@ -1296,6 +1296,7 @@ fail:
int gfs2_xattr_acl_chmod(struct gfs2_inode *ip, struct iattr *attr, char *data)
{
+ struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
struct gfs2_ea_location el;
struct buffer_head *dibh;
int error;
@@ -1305,16 +1306,17 @@ int gfs2_xattr_acl_chmod(struct gfs2_inode *ip, struct iattr *attr, char *data)
return error;
if (GFS2_EA_IS_STUFFED(el.el_ea)) {
- error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + RES_EATTR, 0);
- if (error)
- return error;
-
- gfs2_trans_add_bh(ip->i_gl, el.el_bh, 1);
- memcpy(GFS2_EA2DATA(el.el_ea), data,
- GFS2_EA_DATA_LEN(el.el_ea));
- } else
+ error = gfs2_trans_begin(sdp, RES_DINODE + RES_EATTR, 0);
+ if (error == 0) {
+ gfs2_trans_add_bh(ip->i_gl, el.el_bh, 1);
+ memcpy(GFS2_EA2DATA(el.el_ea), data,
+ GFS2_EA_DATA_LEN(el.el_ea));
+ }
+ } else {
error = ea_acl_chmod_unstuffed(ip, el.el_ea, data);
+ }
+ brelse(el.el_bh);
if (error)
return error;
@@ -1327,8 +1329,7 @@ int gfs2_xattr_acl_chmod(struct gfs2_inode *ip, struct iattr *attr, char *data)
brelse(dibh);
}
- gfs2_trans_end(GFS2_SB(&ip->i_inode));
-
+ gfs2_trans_end(sdp);
return error;
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 4/4] GFS2: Use MAX_LFS_FILESIZE for meta inode size
2010-01-11 9:11 ` [PATCH 3/4] GFS2: Fix gfs2_xattr_acl_chmod() Steven Whitehouse
@ 2010-01-11 9:11 ` Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2010-01-11 9:11 UTC (permalink / raw)
To: linux-kernel, cluster-devel; +Cc: Steven Whitehouse
Using ~0ULL was cauing sign issues in filemap_fdatawrite_range, so
use MAX_LFS_FILESIZE instead.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/meta_io.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index cb8d7a9..6f68a5f 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -121,7 +121,7 @@ struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp)
if (aspace) {
mapping_set_gfp_mask(aspace->i_mapping, GFP_NOFS);
aspace->i_mapping->a_ops = &aspace_aops;
- aspace->i_size = ~0ULL;
+ aspace->i_size = MAX_LFS_FILESIZE;
ip = GFS2_I(aspace);
clear_bit(GIF_USER, &ip->i_flags);
insert_inode_hash(aspace);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2010-02-04 9:46 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2010-02-04 9:46 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are a couple of patches which between them fix a problem where
occasionally it was possible for the GFS2 module to be unloaded
before all the glocks were deallocated, which, needless to say, made
the slab allocator unhappy,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2010-05-25 8:21 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2010-05-25 8:21 UTC (permalink / raw)
To: cluster-devel, linux-kernel
Hi,
These are three important, but relatively small, bug fixes for GFS2.
The first prevents a kernel BUG triggering in a relatively unlikely
(but possible) scenario when a log flush caused by glock demotion
races with a log flush from some other initiator (e.g. fsync).
The second and third patches add extra conditions to two areas
of code. This makes their behaviour match ext3 in those cases,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2010-07-15 13:57 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2010-07-15 13:57 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are a few small fixes for GFS2,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2011-04-19 8:40 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2011-04-19 8:40 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are four fixes for GFS2. See the individual patches for the detailed
descriptions,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2011-05-23 12:39 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2011-05-23 12:39 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are a couple of small fixes which just missed the previous pull
request. Both fairly short and self-explanatory,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2011-07-14 8:21 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2011-07-14 8:21 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
The following three fixes should help ensure that 3.0 is the best
release yet, GFS2-wise at least. I've had the first two queued for
some time waiting for the final one of this set. All three are relatively
short, although the third is a bit longer than the others, mainly
due to the extra comments added describing the inode eviction process,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2012-02-28 11:11 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2012-02-28 11:11 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are four patches which provided fixes for bugs found in the
current upstream code. Please see individual patches for
descriptions,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2012-04-11 8:56 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2012-04-11 8:56 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are four fixes for issues that have come up since the last
merge window,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2012-09-13 9:42 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2012-09-13 9:42 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are three GFS2 fixes for the current kernel tree. These are all
related to the block reservation code which was added at the merge
window. That code will be getting an update at the forthcoming merge
window too. In the mean time though there are a few smaller issues
which should be fixed.
The first patch resolves an issue with write sizes of greater than
32 bits with the size hinting code. The second ensures that the
allocation data structure is initialised when using xattrs and the
third takes into account allocations which may have been made by
other nodes which affect a reservation on the local node,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2012-11-07 10:15 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2012-11-07 10:15 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are a number of GFS2 bug fixes. There are three from Andy Price
which fix various issues spotted by automated code analysis. There are two
from Lukas Czerner fixing my mistaken assumptions as to how FITRIM
should work. Finally Ben Marzinski has fixed a bug relating to mmap and
atime and also a bug relating to a locking issue in the transaction code.
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2013-05-24 13:37 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2013-05-24 13:37 UTC (permalink / raw)
To: linux-kernel, cluster-devel
This time there are just four fixes. There are a couple of minor updates
to the quota code, a fix for KConfig to ensure that only valid combinations
including GFS2 can be built, and a fix for a typo affecting end i/o
processing when writing the journal.
Also, there is a temporary fix for a performance regression relating to
block reservations and directories. A longer fix will be applied in
due course, but this deals with the most immediate problem for now,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2013-06-04 13:40 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2013-06-04 13:40 UTC (permalink / raw)
To: linux-kernel, cluster-devel
There are four patches this time. The first fixes a problem where the
wrong descriptor type was being written into the log for journaled data
blocks. The second fixes a race relating to the deallocation of allocator
data. The third provides a fallback if kmalloc is unable to satisfy a
request to allocate a directory hash table. The fourth fixes the iopen
glock caching so that inodes are deleted in a more timely manner after
rmdir/unlink,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2013-08-19 8:48 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2013-08-19 8:48 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Out of these fives patches, the one for ensuring that the number of
revokes is not exceeded, and the one for checking the glock is not
already held in gfs2_getxattr are the two most important. The latter
can be triggered by selinux.
The other three patches are very small and fix mostly fairly
trivial issues,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2013-11-22 10:35 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2013-11-22 10:35 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are a couple of very small, but important, fixes,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2014-01-02 12:28 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2014-01-02 12:28 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here is a set of small fixes for GFS2. There is a fix to drop
s_umount which is copied in from the core vfs, two patches
relate to a hard to hit "use after free" and memory leak.
Two patches related to using DIO and buffered I/O on the same
file to ensure correct operation in relation to glock state
changes. The final patch adds an RCU read lock to ensure
correct locking on an error path,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2014-07-18 10:37 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2014-07-18 10:37 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are the current set of small fixes relating to GFS2.
This patch set contains two minor docs/spelling fixes, some fixes for
flock, a change to use GFP_NOFS to avoid recursion on a rarely used code
path and a fix for a race relating to the glock lru,
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
* GFS2: Pre-pull patch posting (fixes)
@ 2014-09-15 9:32 Steven Whitehouse
0 siblings, 0 replies; 23+ messages in thread
From: Steven Whitehouse @ 2014-09-15 9:32 UTC (permalink / raw)
To: linux-kernel, cluster-devel
Hi,
Here are a number of small fixes for GFS2. There is a fix for FIEMAP
on large sparse files, a negative dentry hashing fix, a fix for
flock, and a bug fix relating to d_splice_alias usage. There are
also (patches 1 and 5) a couple of updates which are less
critical, but small and low risk.
Steve.
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2014-09-15 9:33 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 9:11 GFS2: Pre-pull patch posting (fixes) Steven Whitehouse
2010-01-11 9:11 ` [PATCH 1/4] GFS2: Ensure uptodate inode size when using O_APPEND Steven Whitehouse
2010-01-11 9:11 ` [PATCH 2/4] GFS2: Fix locking bug in rename Steven Whitehouse
2010-01-11 9:11 ` [PATCH 3/4] GFS2: Fix gfs2_xattr_acl_chmod() Steven Whitehouse
2010-01-11 9:11 ` [PATCH 4/4] GFS2: Use MAX_LFS_FILESIZE for meta inode size Steven Whitehouse
-- strict thread matches above, loose matches on Subject: below --
2014-09-15 9:32 GFS2: Pre-pull patch posting (fixes) Steven Whitehouse
2014-07-18 10:37 Steven Whitehouse
2014-01-02 12:28 Steven Whitehouse
2013-11-22 10:35 Steven Whitehouse
2013-08-19 8:48 Steven Whitehouse
2013-06-04 13:40 Steven Whitehouse
2013-05-24 13:37 Steven Whitehouse
2012-11-07 10:15 Steven Whitehouse
2012-09-13 9:42 Steven Whitehouse
2012-04-11 8:56 Steven Whitehouse
2012-02-28 11:11 Steven Whitehouse
2011-07-14 8:21 Steven Whitehouse
2011-05-23 12:39 Steven Whitehouse
2011-04-19 8:40 Steven Whitehouse
2010-07-15 13:57 Steven Whitehouse
2010-05-25 8:21 Steven Whitehouse
2010-02-04 9:46 Steven Whitehouse
2009-07-30 13:45 Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).