* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2011-03-15 9:11 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2011-03-15 9:11 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
The most interesting "feature" in this patch set is the RCU glock
patch which has been a long time coming, but is finally here. That
patch contains most of the changes this time. The other patches ins
this set are mostly smaller bug fixes and performance improvements.
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2011-05-19 8:46 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2011-05-19 8:46 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
This time, most of the GFS2 patches are code clean up, although there
are a few bug fixes (fallocate/ail writeback/end of life inodes/nlink) and
some new features (new tracepoint & tracing flags, using the UUID field
in the generic superblock).
The changes can be broadly divided into three sets:
1. Bob's directory code clean up
2. My fsync/ail writeback fixes & clean up
3. inode.c/ops_inode.c clean up
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2011-07-22 9:16 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2011-07-22 9:16 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Not a lot new this time... the addition of a cache for the directory hash table
improve directory read/lookup speed, automatic adjustment of the glock hold
time improves performance for some contention corner cases. S_NOSEC support
is another performance related change, plus a nice clean up from Eric
Sandeen,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2011-10-24 12:48 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2011-10-24 12:48 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Since the merge window is upon us, here is the current content of
the GFS2 git tree. A few things will be help back to the following
merge window in order to ensure a greater test time, but those currently
in the tree are ready for the current window.
Recently I've reconstituted the GFS2 git tree, so it can be pulled
(via http) from:
http://sucs.org/~rohan/git/gfs2-3.0-nmw
and viewed via gitweb at:
http://sucs.org/gitweb/
This is thanks to the Swansea University Computer Society for providing
a temporary (or possibly permanent) home for the GFS2 git trees. Please
treat their server kindly as this will only continue while it doesn't
generate too much traffic. I figure that there will not be too many
people pulling the GFS2 tree at once, but we'll see.
Some highlights of the current patch set:
o Reduction in code of approx 400 lines
o Big clean up (and speed up) in the resource group code
- This is a nice base to build some forthcoming improvements on
- It should improve performance with multi-threaded workloads
o Some left-over fsync/writeback changes
o Improvements to readahead when deallocating large directories
Any questions/concerns then please let me know as usual,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2012-01-05 11:51 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2012-01-05 11:51 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
The main feature this time is clean up around the allocation and
resource group code. Otherwise the remainder is mostly small
bug fixes.
I've held back the glock stats patch and that will probably be
ready for the following merge window with a bit of luck,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2012-03-19 10:25 Steven Whitehouse
[not found] ` <4F674696.7030602@xenotime.net>
0 siblings, 1 reply; 41+ messages in thread
From: Steven Whitehouse @ 2012-03-19 10:25 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Not a huge number of patches this time. Some notable new features
though:
- Glock stats gathering (v. useful for performance analysis)
- FITRIM ioctl support
- Sorting the ordered write list (big performance increase when the workload
doesn't result in the write requests being nicely ordered to start with)
Plus a few clean ups, and bug fixes in addition,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
[not found] ` <4F674696.7030602@xenotime.net>
@ 2012-03-19 14:59 ` Steven Whitehouse
[not found] ` <4F674E4F.5080904@xenotime.net>
0 siblings, 1 reply; 41+ messages in thread
From: Steven Whitehouse @ 2012-03-19 14:59 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Mon, 2012-03-19 at 07:45 -0700, Randy Dunlap wrote:
> On 03/19/2012 03:25 AM, Steven Whitehouse wrote:
>
> > Hi,
> >
> > Not a huge number of patches this time. Some notable new features
> > though:
> > - Glock stats gathering (v. useful for performance analysis)
> > - FITRIM ioctl support
> > - Sorting the ordered write list (big performance increase when the workload
> > doesn't result in the write requests being nicely ordered to start with)
> >
> > Plus a few clean ups, and bug fixes in addition,
>
>
>
> Hi,
>
> I reported a build error in linux-next 20120313, but it appears
> that mainline also needs the fix (when it's ready) since mainline
> gfs2 Kconfig selects DLM_SCTP, which does not exist.
>
> https://lkml.org/lkml/2012/3/13/456
>
Does the following fix the problem? If so then I'll roll that into the
tree before it gets pushed,
Steve.
diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
index c465ae0..f4e1c60 100644
--- a/fs/gfs2/Kconfig
+++ b/fs/gfs2/Kconfig
@@ -4,7 +4,7 @@ config GFS2_FS
select DLM if GFS2_FS_LOCKING_DLM
select CONFIGFS_FS if GFS2_FS_LOCKING_DLM
select SYSFS if GFS2_FS_LOCKING_DLM
- select IP_SCTP if DLM_SCTP
+ select IP_SCTP if GFS2_FS_LOCKING_DLM
select FS_POSIX_ACL
select CRC32
select QUOTACTL
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
[not found] ` <4F674E4F.5080904@xenotime.net>
@ 2012-03-19 15:34 ` Steven Whitehouse
2012-03-23 19:41 ` David Teigland
2012-03-20 9:47 ` Steven Whitehouse
1 sibling, 1 reply; 41+ messages in thread
From: Steven Whitehouse @ 2012-03-19 15:34 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Mon, 2012-03-19 at 08:18 -0700, Randy Dunlap wrote:
> On 03/19/2012 07:59 AM, Steven Whitehouse wrote:
>
> > Hi,
> >
> > On Mon, 2012-03-19 at 07:45 -0700, Randy Dunlap wrote:
> >> On 03/19/2012 03:25 AM, Steven Whitehouse wrote:
> >>
> >>> Hi,
> >>>
> >>> Not a huge number of patches this time. Some notable new features
> >>> though:
> >>> - Glock stats gathering (v. useful for performance analysis)
> >>> - FITRIM ioctl support
> >>> - Sorting the ordered write list (big performance increase when the workload
> >>> doesn't result in the write requests being nicely ordered to start with)
> >>>
> >>> Plus a few clean ups, and bug fixes in addition,
> >>
> >>
> >>
> >> Hi,
> >>
> >> I reported a build error in linux-next 20120313, but it appears
> >> that mainline also needs the fix (when it's ready) since mainline
> >> gfs2 Kconfig selects DLM_SCTP, which does not exist.
> >>
> >> https://lkml.org/lkml/2012/3/13/456
> >>
> >
> > Does the following fix the problem? If so then I'll roll that into the
> > tree before it gets pushed,
> >
>
> No, that's not sufficient:
>
> warning: (GFS2_FS) selects DLM which has unmet direct dependencies (EXPERIMENTAL && INET && SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n))
> warning: (DLM && GFS2_FS) selects IP_SCTP which has unmet direct dependencies (NET && INET && EXPERIMENTAL && (IPV6 || IPV6=n))
>
> and
>
> ERROR: "crc32c" [net/sctp/sctp.ko] undefined!
>
>
Hmm, ok. I'll look at this again. I'm not sure why DLM is still calling
itself EXPERIMENTAL since thats long since not been the case, maybe SCTP
still is, but I don't think GFS2 should be selecting EXPERIMENTAL
directly, anyway. It is rather easy to tie ones' self in knots with this
config language.... since GFS2_FS_LOCKING_DLM depends on NET && INET &&
(IPV6 || IPV6=n) && HOTPLUG then all those other deps must presumably be
set anyway, so I don't understand quite why DLM doesn't have those
available to it.
I'll dig around a bit and see if I can figure out whats going on here,
Steve.
>
>
> >
> > diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
> > index c465ae0..f4e1c60 100644
> > --- a/fs/gfs2/Kconfig
> > +++ b/fs/gfs2/Kconfig
> > @@ -4,7 +4,7 @@ config GFS2_FS
> > select DLM if GFS2_FS_LOCKING_DLM
> > select CONFIGFS_FS if GFS2_FS_LOCKING_DLM
> > select SYSFS if GFS2_FS_LOCKING_DLM
> > - select IP_SCTP if DLM_SCTP
> > + select IP_SCTP if GFS2_FS_LOCKING_DLM
> > select FS_POSIX_ACL
> > select CRC32
> > select QUOTACTL
> >
> >
>
>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
[not found] ` <4F674E4F.5080904@xenotime.net>
2012-03-19 15:34 ` Steven Whitehouse
@ 2012-03-20 9:47 ` Steven Whitehouse
1 sibling, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2012-03-20 9:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Mon, 2012-03-19 at 08:18 -0700, Randy Dunlap wrote:
> On 03/19/2012 07:59 AM, Steven Whitehouse wrote:
>
> > Hi,
> >
> > On Mon, 2012-03-19 at 07:45 -0700, Randy Dunlap wrote:
> >> On 03/19/2012 03:25 AM, Steven Whitehouse wrote:
> >>
> >>> Hi,
> >>>
> >>> Not a huge number of patches this time. Some notable new features
> >>> though:
> >>> - Glock stats gathering (v. useful for performance analysis)
> >>> - FITRIM ioctl support
> >>> - Sorting the ordered write list (big performance increase when the workload
> >>> doesn't result in the write requests being nicely ordered to start with)
> >>>
> >>> Plus a few clean ups, and bug fixes in addition,
> >>
> >>
> >>
> >> Hi,
> >>
> >> I reported a build error in linux-next 20120313, but it appears
> >> that mainline also needs the fix (when it's ready) since mainline
> >> gfs2 Kconfig selects DLM_SCTP, which does not exist.
> >>
> >> https://lkml.org/lkml/2012/3/13/456
> >>
> >
> > Does the following fix the problem? If so then I'll roll that into the
> > tree before it gets pushed,
> >
>
> No, that's not sufficient:
>
> warning: (GFS2_FS) selects DLM which has unmet direct dependencies (EXPERIMENTAL && INET && SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n))
> warning: (DLM && GFS2_FS) selects IP_SCTP which has unmet direct dependencies (NET && INET && EXPERIMENTAL && (IPV6 || IPV6=n))
>
> and
>
> ERROR: "crc32c" [net/sctp/sctp.ko] undefined!
>
>
Since the pending patch set doesn't affect the Kconfig at all, I don't
think that this issue needs to hold up merging the GFS2 tree. We'll
follow up with a fix for this later on,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
2012-03-19 15:34 ` Steven Whitehouse
@ 2012-03-23 19:41 ` David Teigland
2012-03-23 19:46 ` David Miller
[not found] ` <4F6CD7AD.9030306@xenotime.net>
0 siblings, 2 replies; 41+ messages in thread
From: David Teigland @ 2012-03-23 19:41 UTC (permalink / raw)
To: cluster-devel.redhat.com
> on i386:
>
> ERROR: "sctp_do_peeloff" [fs/dlm/dlm.ko] undefined!
>
>
> GFS2_FS selects DLM (if GFS2_FS_LOCKING_DLM, which is enabled).
> GFS2_FS selects IP_SCTP if DLM_SCTP, which is not enabled and not
> used anywhere else in the kernel tree AFAICT.
> DLM just always selects IP_SCTP.
Here's what we have now:
config GFS2_FS
tristate "GFS2 file system support"
depends on (64BIT || LBDAF)
select DLM if GFS2_FS_LOCKING_DLM
select CONFIGFS_FS if GFS2_FS_LOCKING_DLM
select SYSFS if GFS2_FS_LOCKING_DLM
select IP_SCTP if DLM_SCTP
select FS_POSIX_ACL
select CRC32
select QUOTACTL
menuconfig DLM
tristate "Distributed Lock Manager (DLM)"
depends on EXPERIMENTAL && INET
depends on SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n)
select IP_SCTP
Why does gfs2 Kconfig bother with SCTP at all? It seems that line should
just be removed. I'll also remove EXPERIMENTAL. I don't understand the
vagaries of Kconfig, so a dumb question, how could sctp_do_peeloff
possibly be undefined if we're selecting SCTP.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
2012-03-23 19:41 ` David Teigland
@ 2012-03-23 19:46 ` David Miller
[not found] ` <4F6CD7AD.9030306@xenotime.net>
1 sibling, 0 replies; 41+ messages in thread
From: David Miller @ 2012-03-23 19:46 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: David Teigland <teigland@redhat.com>
Date: Fri, 23 Mar 2012 15:41:52 -0400
> Why does gfs2 Kconfig bother with SCTP at all? It seems that line should
> just be removed. I'll also remove EXPERIMENTAL. I don't understand the
> vagaries of Kconfig, so a dumb question, how could sctp_do_peeloff
> possibly be undefined if we're selecting SCTP.
GFS2=y SCTP=m
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
[not found] ` <4F6CD7AD.9030306@xenotime.net>
@ 2012-03-23 20:09 ` Steven Whitehouse
2012-03-23 20:18 ` David Teigland
1 sibling, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2012-03-23 20:09 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Fri, 2012-03-23 at 13:06 -0700, Randy Dunlap wrote:
> On 03/23/2012 12:41 PM, David Teigland wrote:
>
> >
> >> on i386:
> >>
> >> ERROR: "sctp_do_peeloff" [fs/dlm/dlm.ko] undefined!
> >>
> >>
> >> GFS2_FS selects DLM (if GFS2_FS_LOCKING_DLM, which is enabled).
> >> GFS2_FS selects IP_SCTP if DLM_SCTP, which is not enabled and not
> >> used anywhere else in the kernel tree AFAICT.
> >> DLM just always selects IP_SCTP.
> >
> > Here's what we have now:
> >
> > config GFS2_FS
> > tristate "GFS2 file system support"
> > depends on (64BIT || LBDAF)
> > select DLM if GFS2_FS_LOCKING_DLM
> > select CONFIGFS_FS if GFS2_FS_LOCKING_DLM
> > select SYSFS if GFS2_FS_LOCKING_DLM
> > select IP_SCTP if DLM_SCTP
> > select FS_POSIX_ACL
> > select CRC32
> > select QUOTACTL
> >
> > menuconfig DLM
> > tristate "Distributed Lock Manager (DLM)"
> > depends on EXPERIMENTAL && INET
> > depends on SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n)
> > select IP_SCTP
> >
> > Why does gfs2 Kconfig bother with SCTP at all? It seems that line should
> > just be removed. I'll also remove EXPERIMENTAL. I don't understand the
> > vagaries of Kconfig, so a dumb question, how could sctp_do_peeloff
> > possibly be undefined if we're selecting SCTP.
>
> What is selecting SCTP? DLM? so GFS2 selects DLM, but selects
> don't follow dependency chains. Also, the "select IP_SCTP if DLM_SCTP"
> in GFS2 is meaningless since there is no DLM_SCTP.
>
> I just verified that the (posted) failing config still fails with
> today's linux-next.
>
The DLM_SCTP is historical. There used to be such a thing, but that
config option went away, and there is now run time selection of the DLM
transport. So that the GFS2 Kconfig should have been updated, however
that appears not to be enough on its own to resolve the issue,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
[not found] ` <4F6CD7AD.9030306@xenotime.net>
2012-03-23 20:09 ` Steven Whitehouse
@ 2012-03-23 20:18 ` David Teigland
[not found] ` <20120323220618.GA30906@d2.synalogic.ca>
1 sibling, 1 reply; 41+ messages in thread
From: David Teigland @ 2012-03-23 20:18 UTC (permalink / raw)
To: cluster-devel.redhat.com
On Fri, Mar 23, 2012 at 01:06:05PM -0700, Randy Dunlap wrote:
> >> GFS2_FS selects DLM (if GFS2_FS_LOCKING_DLM, which is enabled).
> >> GFS2_FS selects IP_SCTP if DLM_SCTP, which is not enabled and not
> >> used anywhere else in the kernel tree AFAICT.
> >> DLM just always selects IP_SCTP.
> >
> > Here's what we have now:
> >
> > config GFS2_FS
> > tristate "GFS2 file system support"
> > depends on (64BIT || LBDAF)
> > select DLM if GFS2_FS_LOCKING_DLM
> > select CONFIGFS_FS if GFS2_FS_LOCKING_DLM
> > select SYSFS if GFS2_FS_LOCKING_DLM
> > select IP_SCTP if DLM_SCTP
> > select FS_POSIX_ACL
> > select CRC32
> > select QUOTACTL
> >
> > menuconfig DLM
> > tristate "Distributed Lock Manager (DLM)"
> > depends on EXPERIMENTAL && INET
> > depends on SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n)
> > select IP_SCTP
> >
> > Why does gfs2 Kconfig bother with SCTP at all? It seems that line should
> > just be removed. I'll also remove EXPERIMENTAL. I don't understand the
> > vagaries of Kconfig, so a dumb question, how could sctp_do_peeloff
> > possibly be undefined if we're selecting SCTP.
>
> What is selecting SCTP? DLM? so GFS2 selects DLM, but selects
> don't follow dependency chains. Also, the "select IP_SCTP if DLM_SCTP"
> in GFS2 is meaningless since there is no DLM_SCTP.
https://lkml.org/lkml/2012/3/8/222 seems to have caused this by adding
the new dependency on the sctp module without any Kconfig changes.
Should that patch have added depends IP_SCTP to the dlm and gfs2?
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
[not found] ` <20120323220618.GA30906@d2.synalogic.ca>
@ 2012-03-26 10:44 ` Steven Whitehouse
[not found] ` <4F79C733.60604@xenotime.net>
0 siblings, 1 reply; 41+ messages in thread
From: Steven Whitehouse @ 2012-03-26 10:44 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Fri, 2012-03-23 at 18:06 -0400, Benjamin Poirier wrote:
[snip]
>
> Instead of trying to select everything in GFS2, how about doing it this way?
>
> [PATCH] gfs2: use depends instead of select in kconfig
>
> Avoids having to duplicate the dependencies of what is 'select'ed (and on
> down...)
>
> Those dependencies are currently incomplete, leading to broken builds with
> GFS2_FS_LOCKING_DLM=y and IP_SCTP=n.
>
> Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
> ---
> fs/gfs2/Kconfig | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
> index c465ae0..eb08c9e 100644
> --- a/fs/gfs2/Kconfig
> +++ b/fs/gfs2/Kconfig
> @@ -1,10 +1,6 @@
> config GFS2_FS
> tristate "GFS2 file system support"
> depends on (64BIT || LBDAF)
> - select DLM if GFS2_FS_LOCKING_DLM
> - select CONFIGFS_FS if GFS2_FS_LOCKING_DLM
> - select SYSFS if GFS2_FS_LOCKING_DLM
> - select IP_SCTP if DLM_SCTP
> select FS_POSIX_ACL
> select CRC32
> select QUOTACTL
> @@ -29,7 +25,8 @@ config GFS2_FS
>
> config GFS2_FS_LOCKING_DLM
> bool "GFS2 DLM locking"
> - depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && HOTPLUG
> + depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && \
> + HOTPLUG && DLM && CONFIGFS_FS && SYSFS
> help
> Multiple node locking module for GFS2
>
That looks ok to me. I've put it in the GFS2 -fixes tree, and if
everybody is happy with that I'll send a pull request shortly,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
[not found] ` <4F79C733.60604@xenotime.net>
@ 2012-04-02 15:47 ` Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2012-04-02 15:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Mon, 2012-04-02 at 08:35 -0700, Randy Dunlap wrote:
> On 03/26/2012 03:44 AM, Steven Whitehouse wrote:
>
> > Hi,
> >
> > On Fri, 2012-03-23 at 18:06 -0400, Benjamin Poirier wrote:
> > [snip]
> >>
> >> Instead of trying to select everything in GFS2, how about doing it this way?
> >>
> >> [PATCH] gfs2: use depends instead of select in kconfig
> >>
> >> Avoids having to duplicate the dependencies of what is 'select'ed (and on
> >> down...)
> >>
> >> Those dependencies are currently incomplete, leading to broken builds with
> >> GFS2_FS_LOCKING_DLM=y and IP_SCTP=n.
> >>
> >> Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
> >> ---
> >> fs/gfs2/Kconfig | 7 ++-----
> >> 1 files changed, 2 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
> >> index c465ae0..eb08c9e 100644
> >> --- a/fs/gfs2/Kconfig
> >> +++ b/fs/gfs2/Kconfig
> >> @@ -1,10 +1,6 @@
> >> config GFS2_FS
> >> tristate "GFS2 file system support"
> >> depends on (64BIT || LBDAF)
> >> - select DLM if GFS2_FS_LOCKING_DLM
> >> - select CONFIGFS_FS if GFS2_FS_LOCKING_DLM
> >> - select SYSFS if GFS2_FS_LOCKING_DLM
> >> - select IP_SCTP if DLM_SCTP
> >> select FS_POSIX_ACL
> >> select CRC32
> >> select QUOTACTL
> >> @@ -29,7 +25,8 @@ config GFS2_FS
> >>
> >> config GFS2_FS_LOCKING_DLM
> >> bool "GFS2 DLM locking"
> >> - depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && HOTPLUG
> >> + depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && \
> >> + HOTPLUG && DLM && CONFIGFS_FS && SYSFS
> >> help
> >> Multiple node locking module for GFS2
> >>
> >
> > That looks ok to me. I've put it in the GFS2 -fixes tree, and if
> > everybody is happy with that I'll send a pull request shortly,
>
>
> Can we get Benjamin's patch merged, please?
> linux-next is still having build errors without it.
>
It is in the GFS2 -nmw tree now, so it will be in linux-next shortly.
I'll merge up the -fixes tree shortly, but I'm expecting one more patch
for that very shortly,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2012-05-17 12:23 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2012-05-17 12:23 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Since the merge window appears to be fast approaching, here are the
current GFS2 patches. This time there are two main themes, one is
updates to the log code, mostly on the writing side. The other is
preparation for some block reservation work which will probably
land in the subsequent merge window.
There is of course the usual collection of cleanup and bug fixes
as well. See the individual patches for the detailed descriptions,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2012-07-23 8:00 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2012-07-23 8:00 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
As usual, here is the content of the GFS2 tree prior to sending
a merge request. Not a huge number of patches this time, but some
interesting features nonetheless.
A number of the earlier patches are aimed at cleaning up the resource
group code for the later patch which implements block reservations.
In addition to that, there are a few patches aimed at improving
the time taken to dump (the potentially rather large) glock debugfs
file. Beyond that there are a couple of bug fixes and thats about it
this time,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2012-09-26 8:25 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2012-09-26 8:25 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
We've collected up a goodly number of patches in the -nmw tree now
and we can hold off any further changes until the following merge
window, so here is the current tree content.
The major feature this time is the "rbm" conversion in the resource
group code. The new struct gfs2_rbm specifies the location of an
allocatable block in (resource group, bitmap, offset) form. There
are a number of added helper functions, and later patches then
rewrite some of the resource group code in terms of this new
structure. Not only does this give us a nice code clean up, but
it also removes some of the previous restructions where extents
could not cross bitmap boundaries, for example.
In addition to that, there are a few bug fixes and clean ups, but
the rbm work is by far the majority of this patch set in terms of
number of changed lines.
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2012-11-30 9:52 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2012-11-30 9:52 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
So yes, this is a bit early, but the tree seems to have settled down
now, and I'd like to hold off any further feature patches until the
subsequent merge window at this stage.
The main feature this time is the new Orlov allocator and the patches
leading up to it which allow us to allocate new inodes from their own
allocation context, rather than borrowing that of their parent directory.
It is this change which then allows us to choose a different location
for subdirectories when required. This works exactly as per the ext3
implementation from the users point of view.
In addition to that, we've got a speed up in gfs2_rbm_from_block()
from Bob Peterson, three locking related improvements from Dave
Teigland plus a selection of smaller bug fixes and clean ups.
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2013-02-19 10:07 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-02-19 10:07 UTC (permalink / raw)
To: cluster-devel.redhat.com
This is one of the smallest collections of patches for the merge
window for some time. There are some clean ups relating to the
transaction code and the shrinker, which are mostly in preparation
for further development, but also make the code much easier to
follow in these areas.
There is a patch which allows the use of ->writepages even in the
default ordered write mode for all writebacks. This results in
sending larger i/os to the block layer, and a subsequent increase
in performance. It also reduces the number of different i/o paths
by one.
There is also a bug fix reinstating the withdraw ack system which
somehow got lost when the lock modules were merged into GFS2.
And thats all this time around,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2013-04-26 9:18 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-04-26 9:18 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Since the merge window is coming up soon, I'm posting the content of
the GFS2 -nmw tree as usual. There is not a whole lot of change this
time - there are some further changes which are in the works, but those
will be held over until next time.
Here there are some clean ups to inode creation, the addition of an
origin (local or remote) indicator to glock demote requests, removal
of one of the remaining GFP_NOFAIL allocations during log flushes,
one minor clean up, and a one liner bug fix,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2013-07-01 9:33 Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 01/12] GFS2: Sort buffer lists by inplace block number Steven Whitehouse
` (11 more replies)
0 siblings, 12 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
There are a few bug fixes for various, mostly very minor corner
cases, plus some interesting new features. The new features
include atomic_open whose main benefit will be the reduction in
locking overhead in case of combined lookup/create and open operations,
sorting the log buffer lists by block number to improve the efficiency
of AIL writeback, and agressively issuing revokes in gfs2_log_flush
to reduce overhead when dropping glocks,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 01/12] GFS2: Sort buffer lists by inplace block number
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 02/12] GFS2: Eliminate gfs2_rg_lops Steven Whitehouse
` (10 subsequent siblings)
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Benjamin Marzinski <bmarzins@redhat.com>
This patch simply sort the data and metadata buffer lists by their
inplace block number. This makes gfs2_log_flush issue the inplace IO
in sequential order, which will hopefully speed up writing the IO
out to disk.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 6c33d7b..cb017a6 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -16,6 +16,7 @@
#include <linux/gfs2_ondisk.h>
#include <linux/bio.h>
#include <linux/fs.h>
+#include <linux/list_sort.h>
#include "gfs2.h"
#include "incore.h"
@@ -401,6 +402,20 @@ static void gfs2_check_magic(struct buffer_head *bh)
kunmap_atomic(kaddr);
}
+static int blocknr_cmp(void *priv, struct list_head *a, struct list_head *b)
+{
+ struct gfs2_bufdata *bda, *bdb;
+
+ bda = list_entry(a, struct gfs2_bufdata, bd_list);
+ bdb = list_entry(b, struct gfs2_bufdata, bd_list);
+
+ if (bda->bd_bh->b_blocknr < bdb->bd_bh->b_blocknr)
+ return -1;
+ if (bda->bd_bh->b_blocknr > bdb->bd_bh->b_blocknr)
+ return 1;
+ return 0;
+}
+
static void gfs2_before_commit(struct gfs2_sbd *sdp, unsigned int limit,
unsigned int total, struct list_head *blist,
bool is_databuf)
@@ -413,6 +428,7 @@ static void gfs2_before_commit(struct gfs2_sbd *sdp, unsigned int limit,
__be64 *ptr;
gfs2_log_lock(sdp);
+ list_sort(NULL, blist, blocknr_cmp);
bd1 = bd2 = list_prepare_entry(bd1, blist, bd_list);
while(total) {
num = total;
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 02/12] GFS2: Eliminate gfs2_rg_lops
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 01/12] GFS2: Sort buffer lists by inplace block number Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 03/12] GFS2: Cocci spatch "ptr_ret.spatch" Steven Whitehouse
` (9 subsequent siblings)
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Bob Peterson <rpeterso@redhat.com>
With recent changes to the transactions, it appears that we
are no longer using the "log ops" for resource groups. Since the
log commit code processes the array of log ops, eliminating this
should be marginally better for performance. Therefore this patch
eliminates it.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index cb017a6..33f18b7 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -852,10 +852,6 @@ const struct gfs2_log_operations gfs2_revoke_lops = {
.lo_name = "revoke",
};
-const struct gfs2_log_operations gfs2_rg_lops = {
- .lo_name = "rg",
-};
-
const struct gfs2_log_operations gfs2_databuf_lops = {
.lo_before_commit = databuf_lo_before_commit,
.lo_after_commit = databuf_lo_after_commit,
@@ -867,7 +863,6 @@ const struct gfs2_log_operations gfs2_databuf_lops = {
const struct gfs2_log_operations *gfs2_log_ops[] = {
&gfs2_databuf_lops,
&gfs2_buf_lops,
- &gfs2_rg_lops,
&gfs2_revoke_lops,
NULL,
};
diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h
index 87e062e..9ca2e64 100644
--- a/fs/gfs2/lops.h
+++ b/fs/gfs2/lops.h
@@ -23,7 +23,6 @@
extern const struct gfs2_log_operations gfs2_glock_lops;
extern const struct gfs2_log_operations gfs2_buf_lops;
extern const struct gfs2_log_operations gfs2_revoke_lops;
-extern const struct gfs2_log_operations gfs2_rg_lops;
extern const struct gfs2_log_operations gfs2_databuf_lops;
extern const struct gfs2_log_operations *gfs2_log_ops[];
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 03/12] GFS2: Cocci spatch "ptr_ret.spatch"
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 01/12] GFS2: Sort buffer lists by inplace block number Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 02/12] GFS2: Eliminate gfs2_rg_lops Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 04/12] GFS2: Remove no-op wrapper function Steven Whitehouse
` (8 subsequent siblings)
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Thomas Meyer <thomas@m3y3r.de>
Use PTR_RET in place of open coding this function.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 62b484e..5fbb8df 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -588,7 +588,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
inode = gfs2_lookupi(dir, &dentry->d_name, 0);
gfs2_glock_dq_uninit(ghs);
d_instantiate(dentry, inode);
- return IS_ERR(inode) ? PTR_ERR(inode) : 0;
+ return PTR_RET(inode);
}
if (error)
goto fail_gunlock;
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 04/12] GFS2: Remove no-op wrapper function
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
` (2 preceding siblings ...)
2013-07-01 9:33 ` [Cluster-devel] [PATCH 03/12] GFS2: Cocci spatch "ptr_ret.spatch" Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 05/12] GFS2: fix error propagation in init_threads() Steven Whitehouse
` (7 subsequent siblings)
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
This wrapper function is no longer required, so get rid of it.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index c253b13..3768c2f 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1154,11 +1154,6 @@ int gfs2_quota_sync(struct super_block *sb, int type)
return error;
}
-static int gfs2_quota_sync_timeo(struct super_block *sb, int type)
-{
- return gfs2_quota_sync(sb, type);
-}
-
int gfs2_quota_refresh(struct gfs2_sbd *sdp, struct kqid qid)
{
struct gfs2_quota_data *qd;
@@ -1414,7 +1409,7 @@ int gfs2_quotad(void *data)
&tune->gt_statfs_quantum);
/* Update quota file */
- quotad_check_timeo(sdp, "sync", gfs2_quota_sync_timeo, t,
+ quotad_check_timeo(sdp, "sync", gfs2_quota_sync, t,
"ad_timeo, &tune->gt_quota_quantum);
/* Check for & recover partially truncated inodes */
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 05/12] GFS2: fix error propagation in init_threads()
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
` (3 preceding siblings ...)
2013-07-01 9:33 ` [Cluster-devel] [PATCH 04/12] GFS2: Remove no-op wrapper function Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 06/12] GFS2: Only do one directory search on create Steven Whitehouse
` (6 subsequent siblings)
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
If kthread_run() fails, init_threads() returns
IS_ERR(p) instead of PTR_ERR(p).
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 60ede2a..0262c19 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -916,16 +916,16 @@ static int init_threads(struct gfs2_sbd *sdp, int undo)
goto fail_quotad;
p = kthread_run(gfs2_logd, sdp, "gfs2_logd");
- error = IS_ERR(p);
- if (error) {
+ if (IS_ERR(p)) {
+ error = PTR_ERR(p);
fs_err(sdp, "can't start logd thread: %d\n", error);
return error;
}
sdp->sd_logd_process = p;
p = kthread_run(gfs2_quotad, sdp, "gfs2_quotad");
- error = IS_ERR(p);
- if (error) {
+ if (IS_ERR(p)) {
+ error = PTR_ERR(p);
fs_err(sdp, "can't start quotad thread: %d\n", error);
goto fail;
}
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 06/12] GFS2: Only do one directory search on create
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
` (4 preceding siblings ...)
2013-07-01 9:33 ` [Cluster-devel] [PATCH 05/12] GFS2: fix error propagation in init_threads() Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 07/12] GFS2: Add atomic_open support Steven Whitehouse
` (5 subsequent siblings)
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
Creation of a new inode requires a directory search in order to ensure
that we are not trying to create an inode with the same name as an
existing one. This was hidden away inside the create_ok() function.
In the case that there was an existing inode, and a lookup can be
substituted for a create (which is the case with regular files
when the O_EXCL flag is not in use) then we were doing a second
lookup in order to return the inode.
This patch merges these two lookups into one. This can be done by
passing a flag to gfs2_dir_search() to tell it to just return -EEXIST
in the cases where we don't actually want to look up the inode.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index b631c90..f0c7052 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1555,9 +1555,9 @@ out:
/**
* gfs2_dir_search - Search a directory
- * @dip: The GFS2 inode
- * @filename:
- * @inode:
+ * @dip: The GFS2 dir inode
+ * @name: The name we are looking up
+ * @fail_on_exist: Fail if the name exists rather than looking it up
*
* This routine searches a directory for a file or another directory.
* Assumes a glock is held on dip.
@@ -1565,22 +1565,25 @@ out:
* Returns: errno
*/
-struct inode *gfs2_dir_search(struct inode *dir, const struct qstr *name)
+struct inode *gfs2_dir_search(struct inode *dir, const struct qstr *name,
+ bool fail_on_exist)
{
struct buffer_head *bh;
struct gfs2_dirent *dent;
- struct inode *inode;
+ u64 addr, formal_ino;
+ u16 dtype;
dent = gfs2_dirent_search(dir, name, gfs2_dirent_find, &bh);
if (dent) {
if (IS_ERR(dent))
return ERR_CAST(dent);
- inode = gfs2_inode_lookup(dir->i_sb,
- be16_to_cpu(dent->de_type),
- be64_to_cpu(dent->de_inum.no_addr),
- be64_to_cpu(dent->de_inum.no_formal_ino), 0);
+ dtype = be16_to_cpu(dent->de_type);
+ addr = be64_to_cpu(dent->de_inum.no_addr);
+ formal_ino = be64_to_cpu(dent->de_inum.no_formal_ino);
brelse(bh);
- return inode;
+ if (fail_on_exist)
+ return ERR_PTR(-EEXIST);
+ return gfs2_inode_lookup(dir->i_sb, dtype, addr, formal_ino, 0);
}
return ERR_PTR(-ENOENT);
}
diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h
index 98c960b..d3f2738 100644
--- a/fs/gfs2/dir.h
+++ b/fs/gfs2/dir.h
@@ -18,7 +18,8 @@ struct gfs2_inode;
struct gfs2_inum;
extern struct inode *gfs2_dir_search(struct inode *dir,
- const struct qstr *filename);
+ const struct qstr *filename,
+ bool fail_on_exist);
extern int gfs2_dir_check(struct inode *dir, const struct qstr *filename,
const struct gfs2_inode *ip);
extern int gfs2_dir_add(struct inode *inode, const struct qstr *filename,
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 5fbb8df..ede16ae 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -313,7 +313,7 @@ struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name,
goto out;
}
- inode = gfs2_dir_search(dir, name);
+ inode = gfs2_dir_search(dir, name, false);
if (IS_ERR(inode))
error = PTR_ERR(inode);
out:
@@ -346,17 +346,6 @@ static int create_ok(struct gfs2_inode *dip, const struct qstr *name,
if (!dip->i_inode.i_nlink)
return -ENOENT;
- error = gfs2_dir_check(&dip->i_inode, name, NULL);
- switch (error) {
- case -ENOENT:
- error = 0;
- break;
- case 0:
- return -EEXIST;
- default:
- return error;
- }
-
if (dip->i_entries == (u32)-1)
return -EFBIG;
if (S_ISDIR(mode) && dip->i_inode.i_nlink == (u32)-1)
@@ -584,14 +573,18 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
goto fail;
error = create_ok(dip, name, mode);
- if ((error == -EEXIST) && S_ISREG(mode) && !excl) {
- inode = gfs2_lookupi(dir, &dentry->d_name, 0);
+ if (error)
+ goto fail_gunlock;
+
+ inode = gfs2_dir_search(dir, &dentry->d_name, !S_ISREG(mode) || excl);
+ error = PTR_ERR(inode);
+ if (!IS_ERR(inode)) {
gfs2_glock_dq_uninit(ghs);
d_instantiate(dentry, inode);
- return PTR_RET(inode);
- }
- if (error)
+ return 0;
+ } else if (error != -ENOENT) {
goto fail_gunlock;
+ }
arq = error = gfs2_diradd_alloc_required(dir, name);
if (error < 0)
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 07/12] GFS2: Add atomic_open support
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
` (5 preceding siblings ...)
2013-07-01 9:33 ` [Cluster-devel] [PATCH 06/12] GFS2: Only do one directory search on create Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 08/12] GFS2: fix regression in dir_double_exhash Steven Whitehouse
` (4 subsequent siblings)
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
I've restricted atomic_open to only operate on regular files, although
I still don't understand why atomic_open should not be possible also for
directories on GFS2. That can always be added in later though, if it
makes sense.
The ->atomic_open function can be passed negative dentries, which
in most cases means either ENOENT (->lookup) or a call to d_instantiate
(->create). In the GFS2 case though, we need to actually perform the
look up, since we do not know whether there has been a new inode created
on another node. The look up calls d_splice_alias which then tries to
rehash the dentry - so the solution here is to simply check for that
in d_splice_alias. The same issue is likely to affect any other cluster
filesystem implementing ->atomic_open
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields fieldses org>
Cc: Jeff Layton <jlayton@redhat.com>
diff --git a/fs/dcache.c b/fs/dcache.c
index f09b908..5a23073 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1612,6 +1612,10 @@ EXPORT_SYMBOL(d_obtain_alias);
* If a dentry was found and moved, then it is returned. Otherwise NULL
* is returned. This matches the expected return value of ->lookup.
*
+ * Cluster filesystems may call this function with a negative, hashed dentry.
+ * In that case, we know that the inode will be a regular file, and also this
+ * will only occur during atomic_open. So we need to check for the dentry
+ * being already hashed only in the final case.
*/
struct dentry *d_splice_alias(struct inode *inode, struct dentry *dentry)
{
@@ -1636,8 +1640,11 @@ struct dentry *d_splice_alias(struct inode *inode, struct dentry *dentry)
security_d_instantiate(dentry, inode);
d_rehash(dentry);
}
- } else
- d_add(dentry, inode);
+ } else {
+ d_instantiate(dentry, inode);
+ if (d_unhashed(dentry))
+ d_rehash(dentry);
+ }
return new;
}
EXPORT_SYMBOL(d_splice_alias);
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index ad0dc38..4ed6a03 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -538,21 +538,30 @@ static int gfs2_mmap(struct file *file, struct vm_area_struct *vma)
}
/**
- * gfs2_open - open a file
- * @inode: the inode to open
- * @file: the struct file for this opening
+ * gfs2_open_common - This is common to open and atomic_open
+ * @inode: The inode being opened
+ * @file: The file being opened
*
- * Returns: errno
+ * This maybe called under a glock or not depending upon how it has
+ * been called. We must always be called under a glock for regular
+ * files, however. For other file types, it does not matter whether
+ * we hold the glock or not.
+ *
+ * Returns: Error code or 0 for success
*/
-static int gfs2_open(struct inode *inode, struct file *file)
+int gfs2_open_common(struct inode *inode, struct file *file)
{
- struct gfs2_inode *ip = GFS2_I(inode);
- struct gfs2_holder i_gh;
struct gfs2_file *fp;
- int error;
+ int ret;
- fp = kzalloc(sizeof(struct gfs2_file), GFP_KERNEL);
+ if (S_ISREG(inode->i_mode)) {
+ ret = generic_file_open(inode, file);
+ if (ret)
+ return ret;
+ }
+
+ fp = kzalloc(sizeof(struct gfs2_file), GFP_NOFS);
if (!fp)
return -ENOMEM;
@@ -560,29 +569,43 @@ static int gfs2_open(struct inode *inode, struct file *file)
gfs2_assert_warn(GFS2_SB(inode), !file->private_data);
file->private_data = fp;
+ return 0;
+}
+
+/**
+ * gfs2_open - open a file
+ * @inode: the inode to open
+ * @file: the struct file for this opening
+ *
+ * After atomic_open, this function is only used for opening files
+ * which are already cached. We must still get the glock for regular
+ * files to ensure that we have the file size uptodate for the large
+ * file check which is in the common code. That is only an issue for
+ * regular files though.
+ *
+ * Returns: errno
+ */
+
+static int gfs2_open(struct inode *inode, struct file *file)
+{
+ struct gfs2_inode *ip = GFS2_I(inode);
+ struct gfs2_holder i_gh;
+ int error;
+ bool need_unlock = false;
if (S_ISREG(ip->i_inode.i_mode)) {
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY,
&i_gh);
if (error)
- goto fail;
+ return error;
+ need_unlock = true;
+ }
- if (!(file->f_flags & O_LARGEFILE) &&
- i_size_read(inode) > MAX_NON_LFS) {
- error = -EOVERFLOW;
- goto fail_gunlock;
- }
+ error = gfs2_open_common(inode, file);
+ if (need_unlock)
gfs2_glock_dq_uninit(&i_gh);
- }
-
- return 0;
-fail_gunlock:
- gfs2_glock_dq_uninit(&i_gh);
-fail:
- file->private_data = NULL;
- kfree(fp);
return error;
}
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index ede16ae..bbb2715 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -535,6 +535,7 @@ static int gfs2_security_init(struct gfs2_inode *dip, struct gfs2_inode *ip,
* gfs2_create_inode - Create a new inode
* @dir: The parent directory
* @dentry: The new dentry
+ * @file: If non-NULL, the file which is being opened
* @mode: The permissions on the new inode
* @dev: For device nodes, this is the device number
* @symname: For symlinks, this is the link destination
@@ -544,8 +545,9 @@ static int gfs2_security_init(struct gfs2_inode *dip, struct gfs2_inode *ip,
*/
static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
+ struct file *file,
umode_t mode, dev_t dev, const char *symname,
- unsigned int size, int excl)
+ unsigned int size, int excl, int *opened)
{
const struct qstr *name = &dentry->d_name;
struct gfs2_holder ghs[2];
@@ -553,6 +555,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
struct gfs2_inode *dip = GFS2_I(dir), *ip;
struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
struct gfs2_glock *io_gl;
+ struct dentry *d;
int error;
u32 aflags = 0;
int arq;
@@ -579,9 +582,20 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
inode = gfs2_dir_search(dir, &dentry->d_name, !S_ISREG(mode) || excl);
error = PTR_ERR(inode);
if (!IS_ERR(inode)) {
+ d = d_splice_alias(inode, dentry);
+ error = 0;
+ if (file && !IS_ERR(d)) {
+ if (d == NULL)
+ d = dentry;
+ if (S_ISREG(inode->i_mode))
+ error = finish_open(file, d, gfs2_open_common, opened);
+ else
+ error = finish_no_open(file, d);
+ }
gfs2_glock_dq_uninit(ghs);
- d_instantiate(dentry, inode);
- return 0;
+ if (IS_ERR(d))
+ return PTR_RET(d);
+ return error;
} else if (error != -ENOENT) {
goto fail_gunlock;
}
@@ -679,10 +693,12 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
goto fail_gunlock3;
mark_inode_dirty(inode);
+ d_instantiate(dentry, inode);
+ if (file)
+ error = finish_open(file, dentry, gfs2_open_common, opened);
gfs2_glock_dq_uninit(ghs);
gfs2_glock_dq_uninit(ghs + 1);
- d_instantiate(dentry, inode);
- return 0;
+ return error;
fail_gunlock3:
gfs2_glock_dq_uninit(ghs + 1);
@@ -722,36 +738,56 @@ fail:
static int gfs2_create(struct inode *dir, struct dentry *dentry,
umode_t mode, bool excl)
{
- return gfs2_create_inode(dir, dentry, S_IFREG | mode, 0, NULL, 0, excl);
+ return gfs2_create_inode(dir, dentry, NULL, S_IFREG | mode, 0, NULL, 0, excl, NULL);
}
/**
- * gfs2_lookup - Look up a filename in a directory and return its inode
+ * __gfs2_lookup - Look up a filename in a directory and return its inode
* @dir: The directory inode
* @dentry: The dentry of the new inode
- * @nd: passed from Linux VFS, ignored by us
+ * @file: File to be opened
+ * @opened: atomic_open flags
*
- * Called by the VFS layer. Lock dir and call gfs2_lookupi()
*
* Returns: errno
*/
-static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry,
- unsigned int flags)
+static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry,
+ struct file *file, int *opened)
{
- struct inode *inode = gfs2_lookupi(dir, &dentry->d_name, 0);
- if (inode && !IS_ERR(inode)) {
- struct gfs2_glock *gl = GFS2_I(inode)->i_gl;
- struct gfs2_holder gh;
- int error;
- error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
- if (error) {
- iput(inode);
- return ERR_PTR(error);
- }
- gfs2_glock_dq_uninit(&gh);
+ struct inode *inode;
+ struct dentry *d;
+ struct gfs2_holder gh;
+ struct gfs2_glock *gl;
+ int error;
+
+ inode = gfs2_lookupi(dir, &dentry->d_name, 0);
+ if (!inode)
+ return NULL;
+ if (IS_ERR(inode))
+ return ERR_CAST(inode);
+
+ gl = GFS2_I(inode)->i_gl;
+ error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
+ if (error) {
+ iput(inode);
+ return ERR_PTR(error);
}
- return d_splice_alias(inode, dentry);
+
+ d = d_splice_alias(inode, dentry);
+ if (file && S_ISREG(inode->i_mode))
+ error = finish_open(file, dentry, gfs2_open_common, opened);
+
+ gfs2_glock_dq_uninit(&gh);
+ if (error)
+ return ERR_PTR(error);
+ return d;
+}
+
+static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry,
+ unsigned flags)
+{
+ return __gfs2_lookup(dir, dentry, NULL, NULL);
}
/**
@@ -1069,7 +1105,7 @@ static int gfs2_symlink(struct inode *dir, struct dentry *dentry,
if (size > sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode) - 1)
return -ENAMETOOLONG;
- return gfs2_create_inode(dir, dentry, S_IFLNK | S_IRWXUGO, 0, symname, size, 0);
+ return gfs2_create_inode(dir, dentry, NULL, S_IFLNK | S_IRWXUGO, 0, symname, size, 0, NULL);
}
/**
@@ -1085,7 +1121,7 @@ static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{
struct gfs2_sbd *sdp = GFS2_SB(dir);
unsigned dsize = sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode);
- return gfs2_create_inode(dir, dentry, S_IFDIR | mode, 0, NULL, dsize, 0);
+ return gfs2_create_inode(dir, dentry, NULL, S_IFDIR | mode, 0, NULL, dsize, 0, NULL);
}
/**
@@ -1100,7 +1136,43 @@ static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
static int gfs2_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
dev_t dev)
{
- return gfs2_create_inode(dir, dentry, mode, dev, NULL, 0, 0);
+ return gfs2_create_inode(dir, dentry, NULL, mode, dev, NULL, 0, 0, NULL);
+}
+
+/**
+ * gfs2_atomic_open - Atomically open a file
+ * @dir: The directory
+ * @dentry: The proposed new entry
+ * @file: The proposed new struct file
+ * @flags: open flags
+ * @mode: File mode
+ * @opened: Flag to say whether the file has been opened or not
+ *
+ * Returns: error code or 0 for success
+ */
+
+static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
+ struct file *file, unsigned flags,
+ umode_t mode, int *opened)
+{
+ struct dentry *d;
+ bool excl = !!(flags & O_EXCL);
+
+ d = __gfs2_lookup(dir, dentry, file, opened);
+ if (IS_ERR(d))
+ return PTR_ERR(d);
+ if (d == NULL)
+ d = dentry;
+ if (d->d_inode) {
+ if (!(*opened & FILE_OPENED))
+ return finish_no_open(file, d);
+ return 0;
+ }
+
+ if (!(flags & O_CREAT))
+ return -ENOENT;
+
+ return gfs2_create_inode(dir, dentry, file, S_IFREG | mode, 0, NULL, 0, excl, opened);
}
/*
@@ -1780,6 +1852,7 @@ const struct inode_operations gfs2_dir_iops = {
.removexattr = gfs2_removexattr,
.fiemap = gfs2_fiemap,
.get_acl = gfs2_get_acl,
+ .atomic_open = gfs2_atomic_open,
};
const struct inode_operations gfs2_symlink_iops = {
diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h
index c53c747..ba4d949 100644
--- a/fs/gfs2/inode.h
+++ b/fs/gfs2/inode.h
@@ -109,6 +109,7 @@ extern int gfs2_permission(struct inode *inode, int mask);
extern int gfs2_setattr_simple(struct inode *inode, struct iattr *attr);
extern struct inode *gfs2_lookup_simple(struct inode *dip, const char *name);
extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf);
+extern int gfs2_open_common(struct inode *inode, struct file *file);
extern const struct inode_operations gfs2_file_iops;
extern const struct inode_operations gfs2_dir_iops;
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 08/12] GFS2: fix regression in dir_double_exhash
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
` (6 preceding siblings ...)
2013-07-01 9:33 ` [Cluster-devel] [PATCH 07/12] GFS2: Add atomic_open support Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 09/12] GFS2: aggressively issue revokes in gfs2_log_flush Steven Whitehouse
` (3 subsequent siblings)
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Bob Peterson <rpeterso@redhat.com>
Recent commit e8830d8 introduced a bug in function dir_double_exhash;
it was failing to set h in the fall-back case. This patch corrects it.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index f0c7052..147fcc5 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1125,13 +1125,14 @@ static int dir_double_exhash(struct gfs2_inode *dip)
if (IS_ERR(hc))
return PTR_ERR(hc);
- h = hc2 = kmalloc(hsize_bytes * 2, GFP_NOFS | __GFP_NOWARN);
+ hc2 = kmalloc(hsize_bytes * 2, GFP_NOFS | __GFP_NOWARN);
if (hc2 == NULL)
hc2 = __vmalloc(hsize_bytes * 2, GFP_NOFS, PAGE_KERNEL);
if (!hc2)
return -ENOMEM;
+ h = hc2;
error = gfs2_meta_inode_buffer(dip, &dibh);
if (error)
goto out_kfree;
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 09/12] GFS2: aggressively issue revokes in gfs2_log_flush
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
` (7 preceding siblings ...)
2013-07-01 9:33 ` [Cluster-devel] [PATCH 08/12] GFS2: fix regression in dir_double_exhash Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 10/12] GFS2: fix warning message Steven Whitehouse
` (2 subsequent siblings)
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Benjamin Marzinski <bmarzins@redhat.com>
This patch looks at all the outstanding blocks in all the transactions
on the log, and moves the completed ones to the ail2 list. Then it
issues revokes for these blocks. This will hopefully speed things up
in situations where there is a lot of contention for glocks, especially
if they are acquired serially.
revoke_lo_before_commit will issue at most one log block's full of these
preemptive revokes. The amount of reserved log space that
gfs2_log_reserve() ignores has been incremented to allow for this extra
block.
This patch also consolidates the common revoke instructions into one
function, gfs2_add_revoke().
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index c66e99c..5f2e522 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -54,7 +54,6 @@ static void __gfs2_ail_flush(struct gfs2_glock *gl, bool fsync)
struct gfs2_bufdata *bd, *tmp;
struct buffer_head *bh;
const unsigned long b_state = (1UL << BH_Dirty)|(1UL << BH_Pinned)|(1UL << BH_Lock);
- sector_t blocknr;
gfs2_log_lock(sdp);
spin_lock(&sdp->sd_ail_lock);
@@ -65,13 +64,6 @@ static void __gfs2_ail_flush(struct gfs2_glock *gl, bool fsync)
continue;
gfs2_ail_error(gl, bh);
}
- blocknr = bh->b_blocknr;
- bh->b_private = NULL;
- gfs2_remove_from_ail(bd); /* drops ref on bh */
-
- bd->bd_bh = NULL;
- bd->bd_blkno = blocknr;
-
gfs2_trans_add_revoke(sdp, bd);
}
GLOCK_BUG_ON(gl, !fsync && atomic_read(&gl->gl_ail_count));
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index b404f48..610613f 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -211,15 +211,16 @@ static void gfs2_ail1_empty_one(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
static int gfs2_ail1_empty(struct gfs2_sbd *sdp)
{
struct gfs2_trans *tr, *s;
+ int oldest_tr = 1;
int ret;
spin_lock(&sdp->sd_ail_lock);
list_for_each_entry_safe_reverse(tr, s, &sdp->sd_ail1_list, tr_list) {
gfs2_ail1_empty_one(sdp, tr);
- if (list_empty(&tr->tr_ail1_list))
+ if (list_empty(&tr->tr_ail1_list) && oldest_tr)
list_move(&tr->tr_list, &sdp->sd_ail2_list);
else
- break;
+ oldest_tr = 0;
}
ret = list_empty(&sdp->sd_ail1_list);
spin_unlock(&sdp->sd_ail_lock);
@@ -317,7 +318,7 @@ static void ail2_empty(struct gfs2_sbd *sdp, unsigned int new_tail)
int gfs2_log_reserve(struct gfs2_sbd *sdp, unsigned int blks)
{
- unsigned reserved_blks = 6 * (4096 / sdp->sd_vfs->s_blocksize);
+ unsigned reserved_blks = 7 * (4096 / sdp->sd_vfs->s_blocksize);
unsigned wanted = blks + reserved_blks;
DEFINE_WAIT(wait);
int did_wait = 0;
@@ -545,6 +546,76 @@ void gfs2_ordered_del_inode(struct gfs2_inode *ip)
spin_unlock(&sdp->sd_ordered_lock);
}
+void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
+{
+ struct buffer_head *bh = bd->bd_bh;
+ struct gfs2_glock *gl = bd->bd_gl;
+
+ gfs2_remove_from_ail(bd);
+ bd->bd_bh = NULL;
+ bh->b_private = NULL;
+ bd->bd_blkno = bh->b_blocknr;
+ bd->bd_ops = &gfs2_revoke_lops;
+ sdp->sd_log_num_revoke++;
+ atomic_inc(&gl->gl_revokes);
+ set_bit(GLF_LFLUSH, &gl->gl_flags);
+ list_add(&bd->bd_list, &sdp->sd_log_le_revoke);
+}
+
+void gfs2_write_revokes(struct gfs2_sbd *sdp)
+{
+ struct gfs2_trans *tr;
+ struct gfs2_bufdata *bd, *tmp;
+ int have_revokes = 0;
+ int max_revokes = (sdp->sd_sb.sb_bsize - sizeof(struct gfs2_log_descriptor)) / sizeof(u64);
+
+ gfs2_ail1_empty(sdp);
+ spin_lock(&sdp->sd_ail_lock);
+ list_for_each_entry(tr, &sdp->sd_ail1_list, tr_list) {
+ list_for_each_entry(bd, &tr->tr_ail2_list, bd_ail_st_list) {
+ if (list_empty(&bd->bd_list)) {
+ have_revokes = 1;
+ goto done;
+ }
+ }
+ }
+done:
+ spin_unlock(&sdp->sd_ail_lock);
+ if (have_revokes == 0)
+ return;
+ while (sdp->sd_log_num_revoke > max_revokes)
+ max_revokes += (sdp->sd_sb.sb_bsize - sizeof(struct gfs2_meta_header)) / sizeof(u64);
+ max_revokes -= sdp->sd_log_num_revoke;
+ if (!sdp->sd_log_num_revoke) {
+ atomic_dec(&sdp->sd_log_blks_free);
+ /* If no blocks have been reserved, we need to also
+ * reserve a block for the header */
+ if (!sdp->sd_log_blks_reserved)
+ atomic_dec(&sdp->sd_log_blks_free);
+ }
+ gfs2_log_lock(sdp);
+ spin_lock(&sdp->sd_ail_lock);
+ list_for_each_entry(tr, &sdp->sd_ail1_list, tr_list) {
+ list_for_each_entry_safe(bd, tmp, &tr->tr_ail2_list, bd_ail_st_list) {
+ if (max_revokes == 0)
+ goto out_of_blocks;
+ if (!list_empty(&bd->bd_list))
+ continue;
+ gfs2_add_revoke(sdp, bd);
+ max_revokes--;
+ }
+ }
+out_of_blocks:
+ spin_unlock(&sdp->sd_ail_lock);
+ gfs2_log_unlock(sdp);
+
+ if (!sdp->sd_log_num_revoke) {
+ atomic_inc(&sdp->sd_log_blks_free);
+ if (!sdp->sd_log_blks_reserved)
+ atomic_inc(&sdp->sd_log_blks_free);
+ }
+}
+
/**
* log_write_header - Get and initialize a journal header buffer
* @sdp: The GFS2 superblock
@@ -562,7 +633,6 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
lh = page_address(page);
clear_page(lh);
- gfs2_ail1_empty(sdp);
tail = current_tail(sdp);
lh->lh_header.mh_magic = cpu_to_be32(GFS2_MAGIC);
diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h
index 3566f35..3721663 100644
--- a/fs/gfs2/log.h
+++ b/fs/gfs2/log.h
@@ -72,5 +72,7 @@ extern void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc)
extern void gfs2_log_shutdown(struct gfs2_sbd *sdp);
extern void gfs2_meta_syncfs(struct gfs2_sbd *sdp);
extern int gfs2_logd(void *data);
+extern void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd);
+extern void gfs2_write_revokes(struct gfs2_sbd *sdp);
#endif /* __LOG_DOT_H__ */
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 33f18b7..17c5b5d 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -606,6 +606,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
struct page *page;
unsigned int length;
+ gfs2_write_revokes(sdp);
if (!sdp->sd_log_num_revoke)
return;
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index 1a89afb..0da3906 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -296,10 +296,6 @@ void gfs2_remove_from_journal(struct buffer_head *bh, struct gfs2_trans *tr, int
if (bd) {
spin_lock(&sdp->sd_ail_lock);
if (bd->bd_tr) {
- gfs2_remove_from_ail(bd);
- bh->b_private = NULL;
- bd->bd_bh = NULL;
- bd->bd_blkno = bh->b_blocknr;
gfs2_trans_add_revoke(sdp, bd);
}
spin_unlock(&sdp->sd_ail_lock);
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 7374907..0fa0dba 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -274,15 +274,9 @@ void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
struct gfs2_trans *tr = current->journal_info;
BUG_ON(!list_empty(&bd->bd_list));
- BUG_ON(!list_empty(&bd->bd_ail_st_list));
- BUG_ON(!list_empty(&bd->bd_ail_gl_list));
- bd->bd_ops = &gfs2_revoke_lops;
+ gfs2_add_revoke(sdp, bd);
tr->tr_touched = 1;
tr->tr_num_revoke++;
- sdp->sd_log_num_revoke++;
- atomic_inc(&gl->gl_revokes);
- set_bit(GLF_LFLUSH, &gl->gl_flags);
- list_add(&bd->bd_list, &sdp->sd_log_le_revoke);
}
void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno, unsigned int len)
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 10/12] GFS2: fix warning message
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
` (8 preceding siblings ...)
2013-07-01 9:33 ` [Cluster-devel] [PATCH 09/12] GFS2: aggressively issue revokes in gfs2_log_flush Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 11/12] GFS2: Fix fstrim boundary conditions Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 12/12] GFS2: Reserve journal space for quota change in do_grow Steven Whitehouse
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Benjamin Marzinski <bmarzins@redhat.com>
This patch fixes a warning message introduced in the recent
"GFS2: aggressively issue revokes in gfs2_log_flush" patch.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 0fa0dba..2b20d70 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -270,7 +270,6 @@ void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh)
void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
{
- struct gfs2_glock *gl = bd->bd_gl;
struct gfs2_trans *tr = current->journal_info;
BUG_ON(!list_empty(&bd->bd_list));
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 11/12] GFS2: Fix fstrim boundary conditions
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
` (9 preceding siblings ...)
2013-07-01 9:33 ` [Cluster-devel] [PATCH 10/12] GFS2: fix warning message Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 12/12] GFS2: Reserve journal space for quota change in do_grow Steven Whitehouse
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Abhijith Das <adas@redhat.com>
This patch correctly distinguishes two boundary conditions:
1. When the given range is entire within the unaccounted space between
two rgrps, and
2. The range begins beyond the end of the filesystem
Also fix the unit of the returned value r.len (total trimming) to be in bytes
instead of the (incorrect) 512 byte blocks
With this patch, GFS2 passes multiple iterations of all the relevant xfstests
(251, 260, 288) with different fs block sizes.
Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 9809156..6931743 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1288,13 +1288,15 @@ int gfs2_fitrim(struct file *filp, void __user *argp)
minlen = max_t(u64, r.minlen,
q->limits.discard_granularity) >> bs_shift;
+ if (end <= start || minlen > sdp->sd_max_rg_data)
+ return -EINVAL;
+
rgd = gfs2_blk2rgrpd(sdp, start, 0);
- rgd_end = gfs2_blk2rgrpd(sdp, end - 1, 0);
+ rgd_end = gfs2_blk2rgrpd(sdp, end, 0);
- if (end <= start ||
- minlen > sdp->sd_max_rg_data ||
- start > rgd_end->rd_data0 + rgd_end->rd_data)
- return -EINVAL;
+ if ((gfs2_rgrpd_get_first(sdp) == gfs2_rgrpd_get_next(rgd_end))
+ && (start > rgd_end->rd_data0 + rgd_end->rd_data))
+ return -EINVAL; /* start is beyond the end of the fs */
while (1) {
@@ -1336,7 +1338,7 @@ int gfs2_fitrim(struct file *filp, void __user *argp)
}
out:
- r.len = trimmed << 9;
+ r.len = trimmed << bs_shift;
if (copy_to_user(argp, &r, sizeof(r)))
return -EFAULT;
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] [PATCH 12/12] GFS2: Reserve journal space for quota change in do_grow
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
` (10 preceding siblings ...)
2013-07-01 9:33 ` [Cluster-devel] [PATCH 11/12] GFS2: Fix fstrim boundary conditions Steven Whitehouse
@ 2013-07-01 9:33 ` Steven Whitehouse
11 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-07-01 9:33 UTC (permalink / raw)
To: cluster-devel.redhat.com
From: Bob Peterson <rpeterso@redhat.com>
If a GFS2 file system is mounted with quotas and a file is grown
in such a way that its free blocks for the allocation are represented
in a secondary bitmap, GFS2 ran out of blocks in the transaction.
That resulted in "fatal: assertion "tr->tr_num_buf <= tr->tr_blocks".
This patch reserves extra blocks for the quota change so the
transaction has enough space.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 93b5809..5e2f56f 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -1232,7 +1232,9 @@ static int do_grow(struct inode *inode, u64 size)
unstuff = 1;
}
- error = gfs2_trans_begin(sdp, RES_DINODE + RES_STATFS + RES_RG_BIT, 0);
+ error = gfs2_trans_begin(sdp, RES_DINODE + RES_STATFS + RES_RG_BIT +
+ (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF ?
+ 0 : RES_QUOTA), 0);
if (error)
goto do_grow_release;
--
1.7.4
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2 Pre-pull patch posting (merge window)
@ 2013-09-05 9:02 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-09-05 9:02 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
This is the smallest merge window patch set for GFS2 for quite
some time. Only one of the patches (moving gfs2_sync_meta) is
a non-bug fix patch, although the merge ordered and writeback
writepage patch is also a nice clean up.
A couple of the patches are quite recently added, due to my only
having recently returned from holiday, so I'll give them a couple
of extra days in -next before sending the pull request.
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2013-11-04 11:09 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2013-11-04 11:09 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
I'm just back from firstly Edinburgh, and secondly holiday, and the
merge window is again upon us. I've added in the three pending patches
which were under test while I was away and then that should be it for
this time.
The main feature of interest this time is quota updates. There are
some clean ups and some patches to use the new generic lru list
code. There is still plenty of scope for some further changes in
due course - faster lookups of quota structures is very much
on the todo list. Also, a start has been made towards the more tricky
issue of using the generic lru code with glocks, but that will
have to be completed in a subsequent merge window.
The other, more minor feature, is that there have been a number of
performance patches which relate to block allocation. In particular
they will improve performance when the disk is nearly full,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2014-01-20 12:23 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2014-01-20 12:23 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Here are the pending patches for the merge window which are currently
in the GFS2 tree.
The main topics this time are allocation, in the form of Bob's
improvements when searching resource groups and several updates
to quotas which should increase scalability. The quota changes
follow on from those in the last merge window, and there will
likely be further work to come in this area in due course.
There are also a few patches which help to improve efficiency
of adding entries into directories, and clean up some of that
code.
One on-disk change is included this time, which is to write some
additional information which should be useful to fsck and
also potentially for debugging.
Other than that, its just a few small random bug fixes and
clean ups,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2014-04-01 9:15 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2014-04-01 9:15 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Here is the current content of the GFS2 -nmw tree for the
current merge window.
One of the main highlights this time, is not the patches themselves
but instead the widening contributor base. It is good to see that
interest is increasing in GFS2, and I'd like to thank all the
contributors to this patch set.
In addition to the usual set of bug fixes and clean ups, there are
patches to improve inode creation performance when xattrs are required
and some improvements to the transaction code which is intended to help
improve scalability after further changes in due course. Journal extent
mapping is also updated to make it more efficient and again, this is a
foundation for future work in this area.
The maximum number of ACLs has been increased to 300 (for a 4k block size)
which means that even with a few additional xattrs from selinux,
everything should fit within a single fs block. There is also a patch
to bring GFS2's own copy of the writepages code up to the same level as
the core VFS. Eventually we may be able to merge some of this code, since
it is fairly similar.
The other major change this time, is bringing consistency to the printing
of messages via fs_<level>, pr_<level> macros.
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2014-06-03 11:02 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2014-06-03 11:02 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
This must be about the smallest merge window patch set ever for GFS2.
It is probably also the first one without a single patch from me. That
is down to a combination of factors, and I have some things in the works
that are not quite ready yet, that I hope to put in next time around.
Returning to what is here this time... we have 3 patches which fix
various warnings. Two are bug fixes (for quotas and also a
rare recovery race condition). The final patch, from Ben Marzinski,
is an important change in the freeze code which has been in
progress for some time. This removes the need to take and drop the
transaction lock for every single transaction, when the only time it
was used, was at file system freeze time. Ben's patch integrates the
freeze operation into the journal flush code as an alternative with
lower overheads and also lands up resolving some difficult to fix races
at the same time,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2014-10-08 9:53 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2014-10-08 9:53 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Not a huge amount this time... just four patches. This time we have a couple
of bug fixes, one relating to bad i_goal values which are now ignored (i_goal
is basically a hint so it is safe to so this) and another relating to the
saving of the dirent location during rename. There is one performance
improvement, which is an optimisation in rgblk_free so that multiple block
deallocations will now be more efficient, and one clean up patch to use
_RET_IP_ rather than writing it out longhand,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Cluster-devel] GFS2: Pre-pull patch posting (merge window)
@ 2014-12-08 12:38 Steven Whitehouse
0 siblings, 0 replies; 41+ messages in thread
From: Steven Whitehouse @ 2014-12-08 12:38 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
In contrast to recent merge windows, there are a number of interesting features
this time. There is a set of patches to improve performance in relation to
block reservations. Some correctness fixes for fallocate, and an update
to the freeze/thaw code which greatly simplyfies this code path. In
addition there is a set of clean ups from Al Viro too,
Steve.
^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2014-12-08 12:38 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 9:33 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 01/12] GFS2: Sort buffer lists by inplace block number Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 02/12] GFS2: Eliminate gfs2_rg_lops Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 03/12] GFS2: Cocci spatch "ptr_ret.spatch" Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 04/12] GFS2: Remove no-op wrapper function Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 05/12] GFS2: fix error propagation in init_threads() Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 06/12] GFS2: Only do one directory search on create Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 07/12] GFS2: Add atomic_open support Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 08/12] GFS2: fix regression in dir_double_exhash Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 09/12] GFS2: aggressively issue revokes in gfs2_log_flush Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 10/12] GFS2: fix warning message Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 11/12] GFS2: Fix fstrim boundary conditions Steven Whitehouse
2013-07-01 9:33 ` [Cluster-devel] [PATCH 12/12] GFS2: Reserve journal space for quota change in do_grow Steven Whitehouse
-- strict thread matches above, loose matches on Subject: below --
2014-12-08 12:38 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
2014-10-08 9:53 Steven Whitehouse
2014-06-03 11:02 Steven Whitehouse
2014-04-01 9:15 Steven Whitehouse
2014-01-20 12:23 Steven Whitehouse
2013-11-04 11:09 Steven Whitehouse
2013-09-05 9:02 [Cluster-devel] GFS2 " Steven Whitehouse
2013-04-26 9:18 [Cluster-devel] GFS2: " Steven Whitehouse
2013-02-19 10:07 Steven Whitehouse
2012-11-30 9:52 Steven Whitehouse
2012-09-26 8:25 Steven Whitehouse
2012-07-23 8:00 Steven Whitehouse
2012-05-17 12:23 Steven Whitehouse
2012-03-19 10:25 Steven Whitehouse
[not found] ` <4F674696.7030602@xenotime.net>
2012-03-19 14:59 ` Steven Whitehouse
[not found] ` <4F674E4F.5080904@xenotime.net>
2012-03-19 15:34 ` Steven Whitehouse
2012-03-23 19:41 ` David Teigland
2012-03-23 19:46 ` David Miller
[not found] ` <4F6CD7AD.9030306@xenotime.net>
2012-03-23 20:09 ` Steven Whitehouse
2012-03-23 20:18 ` David Teigland
[not found] ` <20120323220618.GA30906@d2.synalogic.ca>
2012-03-26 10:44 ` Steven Whitehouse
[not found] ` <4F79C733.60604@xenotime.net>
2012-04-02 15:47 ` Steven Whitehouse
2012-03-20 9:47 ` Steven Whitehouse
2012-01-05 11:51 Steven Whitehouse
2011-10-24 12:48 Steven Whitehouse
2011-07-22 9:16 Steven Whitehouse
2011-05-19 8:46 Steven Whitehouse
2011-03-15 9:11 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).