Displaying 5 results from an estimated 5 matches for "9c107d1".
2015 Oct 19
5
[PATCHv2 0/2] Introduce vfs_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments.
Difference to v1:
Added reply_with_error where necessary.
Changed name get_min_size -> vfs_min_size.
Maxim Perevedentsev (2):
New API: vfs_min_size
Include resize2fs_P into vfs_min_size.
daemon/Makefile.am | 1 +
daemon/daemon.h | 2 ++
daemon/ext2.c | 45 ++++++++++++++++++++++++++-----
daemon/fs-min-size.c | 49
2015 Oct 19
0
[PATCH 2/2] Include resize2fs_P into vfs_min_size.
..."\nBlock count: %" SCNd32 "\n", ret, block_size);
+ }
+ return ret * block_size;
}
}
+ reply_with_error("Minimum size not found. Check output format:\n%s", out);
return -1;
}
diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c
index 9c107d1..8c7287f 100644
--- a/daemon/fs-min-size.c
+++ b/daemon/fs-min-size.c
@@ -35,6 +35,9 @@ do_vfs_min_size(const mountable_t *mountable)
if (vfs_type == NULL)
return -1;
+ else if (fstype_is_extfs (vfs_type))
+ r = ext_min_size (mountable->device);
+
else if (STREQ (vfs_type, "...
2015 Oct 19
1
Re: [PATCH 2/2] Include resize2fs_P into vfs_min_size.
...eck ret for possible overflows before multiplying it
with block_size.
> }
> }
>
> + reply_with_error("Minimum size not found. Check output format:\n%s", out);
> return -1;
> }
>
> diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c
> index 9c107d1..8c7287f 100644
> --- a/daemon/fs-min-size.c
> +++ b/daemon/fs-min-size.c
> @@ -35,6 +35,9 @@ do_vfs_min_size(const mountable_t *mountable)
> if (vfs_type == NULL)
> return -1;
>
> + else if (fstype_is_extfs (vfs_type))
> + r = ext_min_size (mountable->devic...
2015 Oct 19
0
[PATCH 1/2] New API: vfs_min_size
...extern int ntfs_set_label (const char *device, const char *label);
+extern int64_t ntfs_min_size (const char *device);
/*-- in swap.c --*/
extern int swap_set_uuid (const char *device, const char *uuid);
diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c
new file mode 100644
index 0000000..9c107d1
--- /dev/null
+++ b/daemon/fs-min-size.c
@@ -0,0 +1,46 @@
+/* libguestfs - the guestfsd daemon
+ * Copyright (C) 2015 Maxim Perevedentsev mperevedentsev@virtuozzo.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public Licens...
2015 Oct 19
5
Re: [PATCH 1/2] New API: vfs_min_size
...ar *device, const char *label);
> +extern int64_t ntfs_min_size (const char *device);
>
> /*-- in swap.c --*/
> extern int swap_set_uuid (const char *device, const char *uuid);
> diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c
> new file mode 100644
> index 0000000..9c107d1
> --- /dev/null
> +++ b/daemon/fs-min-size.c
> @@ -0,0 +1,46 @@
> +/* libguestfs - the guestfsd daemon
> + * Copyright (C) 2015 Maxim Perevedentsev mperevedentsev@virtuozzo.com
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under th...