Displaying 6 results from an estimated 6 matches for "tmpdisk_flush".
2020 Apr 09
0
[PATCH nbdkit v2 3/3] tmpdisk: Implement this plugin using fileops.
...%m");
- return -1;
- }
- buf += r;
- count -= r;
- offset += r;
- }
-
- /* Deliberately ignore FUA if present in flags. */
-
- return 0;
-}
-
-/* This plugin deliberately provides a null flush operation, because
- * all of the disks created are temporary.
- */
-static int
-tmpdisk_flush (void *handle, uint32_t flags)
-{
- return 0;
-}
-
-#if defined (FALLOC_FL_PUNCH_HOLE)
-static int
-do_fallocate (int fd, int mode, off_t offset, off_t len)
-{
- int r = fallocate (fd, mode, offset, len);
- if (r == -1 && errno == ENODEV) {
- /* kernel 3.10 fails with ENODEV for block...
2020 Mar 17
0
Re: [PATCH nbdkit v2] New tmpdisk plugin.
...ffset += r;
> + }
> +
> + /* Deliberately ignore FUA if present in flags. */
Makes sense.
> +
> + return 0;
> +}
> +
> +/* This plugin deliberately provides a null flush operation, because
> + * all of the disks created are temporary.
> + */
> +static int
> +tmpdisk_flush (void *handle, uint32_t flags)
> +{
> + return 0;
As does this.
> +/* Punch a hole in the file. */
> +static int
> +tmpdisk_trim (void *handle, uint32_t count, uint64_t offset, uint32_t flags)
> +{
> +#ifdef FALLOC_FL_PUNCH_HOLE
> + struct handle *h = handle;
> + int...
2020 Mar 17
2
[PATCH nbdkit v2] New tmpdisk plugin.
...%m");
+ return -1;
+ }
+ buf += r;
+ count -= r;
+ offset += r;
+ }
+
+ /* Deliberately ignore FUA if present in flags. */
+
+ return 0;
+}
+
+/* This plugin deliberately provides a null flush operation, because
+ * all of the disks created are temporary.
+ */
+static int
+tmpdisk_flush (void *handle, uint32_t flags)
+{
+ return 0;
+}
+
+#if defined (FALLOC_FL_PUNCH_HOLE)
+static int
+do_fallocate (int fd, int mode, off_t offset, off_t len)
+{
+ int r = fallocate (fd, mode, offset, len);
+ if (r == -1 && errno == ENODEV) {
+ /* kernel 3.10 fails with ENODEV for block...
2020 Mar 16
1
[PATCH nbdkit] New tmpdisk plugin.
Unfinished (needs tests). This is my attempt to make a
"remote tmpfs" plugin as outlined in this prior email:
https://www.redhat.com/archives/libguestfs/2020-March/msg00134.html
Although it would be possible to construct something a bit like this
using existing plugins and filters (perhaps with some new features in
those filters) I think it may be nicer to have a dedicated plugin for
2020 Mar 17
2
[PATCH nbdkit v3] New tmpdisk plugin.
v2 was here:
https://www.redhat.com/archives/libguestfs/2020-March/msg00154.html
v3:
- Micro-optimize tmpdir.
- Quote $disk in default command shell fragment.
- Don't redirect mkfs output to /dev/null. Instead use
exec </dev/null >/dev/null before the shell fragment.
We may want to do this in other places where we run
external shell scripts, or more generally for all
2020 Apr 09
6
[PATCH nbdkit v2 0/3] Implement fileops.
Needs some work still, see in particular the commit message
for patch 3.
Rich.