[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 1/2] mkfs: Don't allow blocksize to be set on btrfs (RHBZ#807905).



On 04/02/2012 10:15 AM, Richard W.M. Jones wrote:
From: "Richard W.M. Jones"<rjones redhat com>

---
  daemon/mkfs.c |    5 +++++
  1 file changed, 5 insertions(+)

diff --git a/daemon/mkfs.c b/daemon/mkfs.c
index 5475582..492b690 100644
--- a/daemon/mkfs.c
+++ b/daemon/mkfs.c
@@ -133,6 +133,11 @@ do_mkfs_opts (const char *fstype, const char *device, int blocksize,
        ADD_ARG (argv, i, "-c");
        ADD_ARG (argv, i, blocksize_str);
      }
+    else if (STREQ (fstype, "btrfs")) {
+      /* For btrfs, blocksize cannot be specified (RHBZ#807905). */
+      reply_with_error ("blocksize cannot be set on btrfs filesystems");
+      return -1;
+    }
      else {
        /* For all other filesystem types, try the -b option. */
        snprintf (blocksize_str, sizeof blocksize_str, "%d", blocksize);

ACK.

Matt
--
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]