Displaying 13 results from an estimated 13 matches for "do_vfs_minimum_size".
2015 Oct 20
2
Re: [PATCHv4 1/2] New API: vfs_minimum_size
On Tuesday 20 October 2015 18:45:55 Maxim Perevedentsev wrote:
> +int64_t
> +do_vfs_minimum_size (const mountable_t *mountable)
> +{
> + int64_t r;
> +
> + /* How we set the label depends on the filesystem type. */
Just noticed now: this comment should be really fitting more the new
function... :)
--
Pino Toscano
2015 Oct 27
1
[PATCHv3] Added btrfs support to vfs_minimum_size.
...+= 2) {
+ if (STREQ (mountpoints[i], device)) {
+ path = strdup (mountpoints[i + 1]);
+ if (path == NULL)
+ reply_with_perror ("strdup");
+ return path;
+ }
+ }
+
+ reply_with_error ("device not mounted: %s", device);
+ return NULL;
+}
+
int64_t
do_vfs_minimum_size (const mountable_t *mountable)
{
int64_t r;
- /* How we set the label depends on the filesystem type. */
+ /* How we get minimum size depends on the filesystem type. */
CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
if (vfs_type == NULL)
return -1;
@@ -41,6 +66,13 @@ do_vf...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...if (stat1.st_rdev == stat2.st_rdev) {
+ /* found it */
+ path = strdup (m->mnt_dir);
+ endmntent (fp);
+ return path;
+ }
+ }
+ }
+
+ endmntent (fp);
+ reply_with_error ("device not mounted: %s", device);
+ return NULL;
+}
+
int64_t
do_vfs_minimum_size (const mountable_t *mountable)
{
int64_t r;
- /* How we set the label depends on the filesystem type. */
+ /* How we get minimum size depends on the filesystem type. */
CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
if (vfs_type == NULL)
return -1;
@@ -41,6 +82,13 @@ do_vf...
2015 Oct 23
0
Re: [PATCH] Added btrfs support for vfs_min_size.
...gt; + path = strdup (m->mnt_dir);
> + endmntent (fp);
> + return path;
> + }
> + }
> + }
> +
> + endmntent (fp);
> + reply_with_error ("device not mounted: %s", device);
> + return NULL;
> +}
> +
> int64_t
> do_vfs_minimum_size (const mountable_t *mountable)
> {
> int64_t r;
>
> - /* How we set the label depends on the filesystem type. */
> + /* How we get minimum size depends on the filesystem type. */
> CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
> if (vfs_type == NULL)
>...
2015 Oct 23
1
[PATCHv2] Added btrfs support for vfs_min_size.
...("cannot get mountpoints");
+ return NULL;
+ }
+
+ for (i = 0; mountpoints[i] != NULL; i += 2) {
+ if (STREQ (mountpoints[i], device))
+ return strdup (mountpoints[i + 1]);
+ }
+
+ reply_with_error ("device not mounted: %s", device);
+ return NULL;
+}
+
int64_t
do_vfs_minimum_size (const mountable_t *mountable)
{
int64_t r;
- /* How we set the label depends on the filesystem type. */
+ /* How we get minimum size depends on the filesystem type. */
CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
if (vfs_type == NULL)
return -1;
@@ -41,6 +57,13 @@ do_vf...
2015 Oct 27
1
[PATCHv2] Added xfs support to vfs_minimum_size.
...imum_size (const char *path);
/*-- debug-bmap.c --*/
extern char *debug_bmap (const char *subcmd, size_t argc, char *const *const argv);
diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c
index ca71c4d..ba0f739 100644
--- a/daemon/fs-min-size.c
+++ b/daemon/fs-min-size.c
@@ -73,6 +73,13 @@ do_vfs_minimum_size (const mountable_t *mountable)
r = btrfs_minimum_size (path);
}
+ else if (STREQ (vfs_type, "xfs")) {
+ CLEANUP_FREE char *path = get_mount_point (mountable->device);
+ if (path == NULL)
+ return -1;
+ r = xfs_minimum_size (path);
+ }
+
else
NOT_SUPPORT...
2015 Oct 20
8
[PATCHv4 0/2] Introduce vfs_minimum_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.
Difference to v2:
Changed name to vfs_minimum_size.
Changed parsing to xstrtol + STR* macros where possible.
Difference to v3:
Decapitalize error messages.
Maxim Perevedentsev (2):
New API: vfs_minimum_size
Include resize2fs_P into
2015 Oct 20
0
Re: [PATCHv4 1/2] New API: vfs_minimum_size
On 10/20/2015 07:49 PM, Pino Toscano wrote:
> On Tuesday 20 October 2015 18:45:55 Maxim Perevedentsev wrote:
>> +int64_t
>> +do_vfs_minimum_size (const mountable_t *mountable)
>> +{
>> + int64_t r;
>> +
>> + /* How we set the label depends on the filesystem type. */
> Just noticed now: this comment should be really fitting more the new
> function... :)
Thanks. I'll fix it in final submission, after Richar...
2015 Oct 20
4
[PATCHv3 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.
Difference to v2:
Changed name to vfs_minimum_size.
Changed parsing to xstrtol + STR* macros where possible.
Maxim Perevedentsev (2):
New API: vfs_min_size
Include resize2fs_P into vfs_min_size.
daemon/Makefile.am | 1 +
2015 Oct 24
3
[PATCH] Added xfs support for vfs_min_size.
...imum_size (const char *path);
/*-- debug-bmap.c --*/
extern char *debug_bmap (const char *subcmd, size_t argc, char *const *const argv);
diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c
index e43237b..432e04f 100644
--- a/daemon/fs-min-size.c
+++ b/daemon/fs-min-size.c
@@ -64,6 +64,13 @@ do_vfs_minimum_size (const mountable_t *mountable)
r = btrfs_minimum_size (path);
}
+ else if (STREQ (vfs_type, "xfs")) {
+ CLEANUP_FREE char *path = get_mount_point (mountable->device);
+ if (path == NULL)
+ return -1;
+ r = xfs_minimum_size (path);
+ }
+
else
NOT_SUPPORT...
2015 Oct 20
0
[PATCHv3 2/2] Include resize2fs_P into vfs_min_size.
...}
}
+#undef XSTRTOD64
+
+ 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 652eb0e..4f93f8c 100644
--- a/daemon/fs-min-size.c
+++ b/daemon/fs-min-size.c
@@ -35,6 +35,9 @@ do_vfs_minimum_size (const mountable_t *mountable)
if (vfs_type == NULL)
return -1;
+ else if (fstype_is_extfs (vfs_type))
+ r = ext_minimum_size (mountable->device);
+
else if (STREQ (vfs_type, "ntfs"))
r = ntfs_minimum_size (mountable->device);
diff --git a/generator/actions.ml...
2015 Oct 20
0
[PATCHv3 1/2] New API: vfs_min_size
...ite to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "daemon.h"
+#include "actions.h"
+
+int64_t
+do_vfs_minimum_size (const mountable_t *mountable)
+{
+ int64_t r;
+
+ /* How we set the label depends on the filesystem type. */
+ CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
+ if (vfs_type == NULL)
+ return -1;
+
+ else if (STREQ (vfs_type, "ntfs"))
+ r = ntfs_minimum_size (mountable-...
2015 Oct 20
0
[PATCHv4 1/2] New API: vfs_minimum_size
...ite to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "daemon.h"
+#include "actions.h"
+
+int64_t
+do_vfs_minimum_size (const mountable_t *mountable)
+{
+ int64_t r;
+
+ /* How we set the label depends on the filesystem type. */
+ CLEANUP_FREE char *vfs_type = do_vfs_type (mountable);
+ if (vfs_type == NULL)
+ return -1;
+
+ else if (STREQ (vfs_type, "ntfs"))
+ r = ntfs_minimum_size (mountable-...