xfsprogs: fixes for release candidate.
cover xfsprogs: fixes for release candidate.
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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 1/2 xfs_db: flush devices before exiting
From: Dave Chinner <[email protected]>
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.
--- db/init.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
db/init.c +9 -1
@@ -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; }
Signature · 6 lines
1.7.10 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 1/2] xfs_db: flush devices before exiting
Quoted 15 lines · Dave Chinner
From: Dave Chinner<[email protected]>
Test 287 uses
xfs_dbto 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_dbuses 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_dbuses 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.
Quoted 7 lines
Fix this by ensuring that
xfs_dbflushes it's changes to disk before it exits by calinglibxfs_device_close(). This fsyncs the data and flushes the caches to ensure that it is present on disk beforexfs_dbexits.Signed-off-by Dave Chinner<[email protected]>---
Looks good. Consistent to mkfs.xfs and xfs_repair.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 2/2 xfs_quota: fix report command parsing
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
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.
--- quota/report.c | 1 + 1 file changed, 1 insertion(+)
quota/report.c +1 -0
@@ -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;
Signature · 6 lines
1.7.10 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH 2/2] xfs_quota: fix report command parsing
Quoted 8 lines · Dave Chinner
From: Dave Chinner<[email protected]>
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.
Quoted 5 lines
Set the command to be a global command so that it is only called once.
Signed-off-by Dave Chinner<[email protected]>---
Solves the duplicate listings.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines · Dave Chinner
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?
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 5 lines · Dave Chinner
Hi Ben,
These are two fixes for bugs that have shown up during the -rc phase of the release. Please consider them for inclusion.
Quoted 8 lines
Cheers,
Dave.
_______________________________________________
xfs mailing list
[email protected]
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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs