Quantcast

[PATCH 0/2] xfsprogs: fixes for release candidate.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 0/2] xfsprogs: fixes for release candidate.

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.

Cheers,

Dave.

_______________________________________________
xfs mailing list
[hidden email]
http://oss.sgi.com/mailman/listinfo/xfs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 1/2] xfs_db: flush devices before exiting

Dave Chinner
From: Dave Chinner <[hidden email]>

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 <[hidden email]>
---
 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
[hidden email]
http://oss.sgi.com/mailman/listinfo/xfs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 2/2] xfs_quota: fix report command parsing

Dave Chinner
In reply to this post by Dave Chinner
From: Dave Chinner <[hidden email]>

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 <[hidden email]>
---
 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
[hidden email]
http://oss.sgi.com/mailman/listinfo/xfs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 0/2] xfsprogs: fixes for release candidate.

Dave Chinner
In reply to this post by Dave Chinner
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
[hidden email]

_______________________________________________
xfs mailing list
[hidden email]
http://oss.sgi.com/mailman/listinfo/xfs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 1/2] xfs_db: flush devices before exiting

Mark Tinguely-3
In reply to this post by Dave Chinner
On 11/09/12 01:02, Dave Chinner wrote:

> From: Dave Chinner<[hidden email]>
>
> 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<[hidden email]>
> ---

Looks good. Consistent to mkfs.xfs and xfs_repair.

Reviewed-by: Mark Tinguely <[hidden email]>

_______________________________________________
xfs mailing list
[hidden email]
http://oss.sgi.com/mailman/listinfo/xfs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 2/2] xfs_quota: fix report command parsing

Mark Tinguely-3
In reply to this post by Dave Chinner
On 11/09/12 01:02, Dave Chinner wrote:

> From: Dave Chinner<[hidden email]>
>
> 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<[hidden email]>
> ---

Solves the duplicate listings.

Reviewed-by: Mark Tinguely <[hidden email]>

_______________________________________________
xfs mailing list
[hidden email]
http://oss.sgi.com/mailman/listinfo/xfs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 0/2] xfsprogs: fixes for release candidate.

Mark Tinguely-3
In reply to this post by Dave Chinner
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
> [hidden email]
> 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
[hidden email]
http://oss.sgi.com/mailman/listinfo/xfs
Loading...