* [PATCH 0/2] xfsprogs: fixes for release candidate.
@ 2012-11-09 7:02 Dave Chinner
2012-11-09 7:02 ` [PATCH 1/2] xfs_db: flush devices before exiting Dave Chinner
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Dave Chinner @ 2012-11-09 7:02 UTC (permalink / raw)
To: xfs
Hi Ben,
These are two fixes for bugs that have shown up during the -rc
phase of the release. Please consider them for inclusion.
Cheers,
Dave.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] xfs_db: flush devices before exiting
2012-11-09 7:02 [PATCH 0/2] xfsprogs: fixes for release candidate Dave Chinner
@ 2012-11-09 7:02 ` Dave Chinner
2012-11-13 17:45 ` Mark Tinguely
2012-11-09 7:02 ` [PATCH 2/2] xfs_quota: fix report command parsing Dave Chinner
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2012-11-09 7:02 UTC (permalink / raw)
To: xfs
From: Dave Chinner <dchinner@redhat.com>
Test 287 uses xfs_db to change 32-bit project ID support while the
filesystem is unmounted. On a large filesystem the test was failing
due to the mount not seeing the feature bit in the superblock.
xfs_db uses a different address space to the filesystem when it is
mounte dby the kernel, so the only way to keep them coherent is to
ensure that all buffered data is written to disk before the other
entity tries to read it. xfs_db uses buffered IO, but does not close
the devices when it exits, thereby leaving changes it has written in
the block device cache rather than on disk. Hence when th ekernel
tries to mount the filesystem, it reads what is on disk and does not
see xfs_db's changes.
Fix this by ensuring that xfs_db flushes it's changes to disk before
it exits by caling libxfs_device_close(). This fsyncs the data and
flushes the caches to ensure that it is present on disk before
xfs_db exits.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
db/init.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/db/init.c b/db/init.c
index 2a5ef2b..2a31cb8 100644
--- a/db/init.c
+++ b/db/init.c
@@ -170,7 +170,7 @@ main(
}
if (cmdline) {
xfree(cmdline);
- return exitcode;
+ goto close_devices;
}
while (!done) {
@@ -181,5 +181,13 @@ main(
done = command(c, v);
doneline(input, v);
}
+
+close_devices:
+ if (x.ddev)
+ libxfs_device_close(x.ddev);
+ if (x.logdev && x.logdev != x.ddev)
+ libxfs_device_close(x.logdev);
+ if (x.rtdev)
+ libxfs_device_close(x.rtdev);
return exitcode;
}
--
1.7.10
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] xfs_quota: fix report command parsing
2012-11-09 7:02 [PATCH 0/2] xfsprogs: fixes for release candidate Dave Chinner
2012-11-09 7:02 ` [PATCH 1/2] xfs_db: flush devices before exiting Dave Chinner
@ 2012-11-09 7:02 ` Dave Chinner
2012-11-13 18:02 ` Mark Tinguely
2012-11-12 23:22 ` [PATCH 0/2] xfsprogs: fixes for release candidate Dave Chinner
2012-11-20 23:17 ` Mark Tinguely
3 siblings, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2012-11-09 7:02 UTC (permalink / raw)
To: xfs
From: Dave Chinner <dchinner@redhat.com>
The report command line needs to be parsed as a whole not as
individual elements - report_f() is set up to do this correctly.
When treated as non-global command line, the report function is
called once for each command line arg, resulting in reports being
issued multiple times.
Set the command to be a global command so that it is only called
once.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
quota/report.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/quota/report.c b/quota/report.c
index a1e165b..70894a2 100644
--- a/quota/report.c
+++ b/quota/report.c
@@ -653,6 +653,7 @@ report_init(void)
report_cmd.cfunc = report_f;
report_cmd.argmin = 0;
report_cmd.argmax = -1;
+ report_cmd.flags = CMD_FLAG_GLOBAL;
report_cmd.args = _("[-bir] [-gpu] [-ahnt] [-f file]");
report_cmd.oneline = _("report filesystem quota information");
report_cmd.help = report_help;
--
1.7.10
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] xfsprogs: fixes for release candidate.
2012-11-09 7:02 [PATCH 0/2] xfsprogs: fixes for release candidate Dave Chinner
2012-11-09 7:02 ` [PATCH 1/2] xfs_db: flush devices before exiting Dave Chinner
2012-11-09 7:02 ` [PATCH 2/2] xfs_quota: fix report command parsing Dave Chinner
@ 2012-11-12 23:22 ` Dave Chinner
2012-11-20 23:17 ` Mark Tinguely
3 siblings, 0 replies; 7+ messages in thread
From: Dave Chinner @ 2012-11-12 23:22 UTC (permalink / raw)
To: xfs
On Fri, Nov 09, 2012 at 06:02:56PM +1100, Dave Chinner wrote:
> Hi Ben,
>
> These are two fixes for bugs that have shown up during the -rc
> phase of the release. Please consider them for inclusion.
ping?
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] xfs_db: flush devices before exiting
2012-11-09 7:02 ` [PATCH 1/2] xfs_db: flush devices before exiting Dave Chinner
@ 2012-11-13 17:45 ` Mark Tinguely
0 siblings, 0 replies; 7+ messages in thread
From: Mark Tinguely @ 2012-11-13 17:45 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On 11/09/12 01:02, Dave Chinner wrote:
> From: Dave Chinner<dchinner@redhat.com>
>
> Test 287 uses xfs_db to change 32-bit project ID support while the
> filesystem is unmounted. On a large filesystem the test was failing
> due to the mount not seeing the feature bit in the superblock.
>
> xfs_db uses a different address space to the filesystem when it is
> mounte dby the kernel, so the only way to keep them coherent is to
> ensure that all buffered data is written to disk before the other
> entity tries to read it. xfs_db uses buffered IO, but does not close
> the devices when it exits, thereby leaving changes it has written in
> the block device cache rather than on disk. Hence when th ekernel
> tries to mount the filesystem, it reads what is on disk and does not
> see xfs_db's changes.
>
> Fix this by ensuring that xfs_db flushes it's changes to disk before
> it exits by caling libxfs_device_close(). This fsyncs the data and
> flushes the caches to ensure that it is present on disk before
> xfs_db exits.
>
> Signed-off-by: Dave Chinner<dchinner@redhat.com>
> ---
Looks good. Consistent to mkfs.xfs and xfs_repair.
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] xfs_quota: fix report command parsing
2012-11-09 7:02 ` [PATCH 2/2] xfs_quota: fix report command parsing Dave Chinner
@ 2012-11-13 18:02 ` Mark Tinguely
0 siblings, 0 replies; 7+ messages in thread
From: Mark Tinguely @ 2012-11-13 18:02 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On 11/09/12 01:02, Dave Chinner wrote:
> From: Dave Chinner<dchinner@redhat.com>
>
> The report command line needs to be parsed as a whole not as
> individual elements - report_f() is set up to do this correctly.
> When treated as non-global command line, the report function is
> called once for each command line arg, resulting in reports being
> issued multiple times.
>
> Set the command to be a global command so that it is only called
> once.
>
> Signed-off-by: Dave Chinner<dchinner@redhat.com>
> ---
Solves the duplicate listings.
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] xfsprogs: fixes for release candidate.
2012-11-09 7:02 [PATCH 0/2] xfsprogs: fixes for release candidate Dave Chinner
` (2 preceding siblings ...)
2012-11-12 23:22 ` [PATCH 0/2] xfsprogs: fixes for release candidate Dave Chinner
@ 2012-11-20 23:17 ` Mark Tinguely
3 siblings, 0 replies; 7+ messages in thread
From: Mark Tinguely @ 2012-11-20 23:17 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On 11/09/12 01:02, Dave Chinner wrote:
> Hi Ben,
>
> These are two fixes for bugs that have shown up during the -rc
> phase of the release. Please consider them for inclusion.
>
> Cheers,
>
> Dave.
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
This series has been committed to git://oss.sgi.com/xfs/cmds/xfsprogs
master branch, commit 1adfff, 19473a and 36298.
--Mark.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-20 23:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-09 7:02 [PATCH 0/2] xfsprogs: fixes for release candidate Dave Chinner
2012-11-09 7:02 ` [PATCH 1/2] xfs_db: flush devices before exiting Dave Chinner
2012-11-13 17:45 ` Mark Tinguely
2012-11-09 7:02 ` [PATCH 2/2] xfs_quota: fix report command parsing Dave Chinner
2012-11-13 18:02 ` Mark Tinguely
2012-11-12 23:22 ` [PATCH 0/2] xfsprogs: fixes for release candidate Dave Chinner
2012-11-20 23:17 ` Mark Tinguely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox