search for: pwrite

Displaying 20 results from an estimated 1040 matches for "pwrite".

Did you mean: write
2023 Aug 31
2
[PATCH nbdkit] sh: In pwrite, allow scripts to ignore stdin
See comment for explanation and https://listman.redhat.com/archives/libguestfs/2023-August/032468.html --- tests/Makefile.am | 2 + plugins/sh/call.c | 33 +++++++----- tests/test-sh-pwrite-ignore-stdin.sh | 77 ++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 12 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index d57eb01b8..e69893e0d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1325,11 +1325,13 @@ test-shell.img: TESTS += \ test-sh-...
2003 Feb 26
0
performance problem with Samba built with pread/pwrite on HP-UX 1 1.11
...1 could be affected. Customers building their own Samba server can find that on 11.11 the performance is slower than on 11.0 when testing with smbtorture, and possibly slower in production. The HP produced Samba version did not have this performance drop, because the HP version did not use pread/pwrite calls. Also note that the problem only affects systems running on top of JFS file systems. Version 2.2.2 Samba can be built to use system calls pread/pwrite, instead of using a combination of lseek (to move the pointer in the file), and read/write. The pread/pwrite calls are fairly new to the HP-...
2015 Nov 07
3
Re: mkfs.ext2 succeeds despite nbd write errors?
...t; errors away, or whether mkfs is getting the errors and ignoring them > (seems pretty unlikely, but you never know). > > After that, it'd be down to tracing where the errors end up in the > kernel. Thanks for the tip! The results are interesting. It looks like all of mkfs's pwrite() calls succeed, but its final fsync() calls do actually fail: root@debian:~# strace mkfs.ext2 /dev/nbd0 2>&1 | tee strace.out root@debian:~# cat strace.out | grep pwrite pwrite(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 32768, 8187379712) = 32768...
2016 Jan 06
0
[klibc:master] Add pread and pwrite 32bit syscall wrappers for parisc
...el.org/?p=libs/klibc/klibc.git;a=commit;h=75895304280f597f46551deb8b87c27ac18a013c Author: Helge Deller <deller at gmx.de> AuthorDate: Wed, 6 Jan 2016 00:43:50 +0000 Committer: H. Peter Anvin <hpa at linux.intel.com> CommitDate: Tue, 5 Jan 2016 17:45:50 -0800 [klibc] Add pread and pwrite 32bit syscall wrappers for parisc On the hppa arch (32bit userspace and 32 or 64bit kernel), the fstype program fails to detect the filesystem. The reason for this failure is, that fstype calls the pread() syscall, which has on some architectures with 32bit userspace a different calling syntax....
2015 Feb 19
4
Excel and Samba Problem
...riteable = yes >>> force group = Intern >>> valid users = @Intern >>> create mask = 0660 >>> directory mask = 0770 >>> vfs objects = full_audit recycle >>> full_audit:prefix = %u >>> full_audit:success = mkdir rename rmdir unlink pwrite >>> full_audit:failure = none >>> full_audit:facility = LOCAL5 >>> full_audit:priority = NOTICE >>> recycle:versions = yes >>> recycle:exclude = .*, ~* >>> >>> >>> And here are the rights for the Files on Samba Server: &...
2015 Nov 07
2
Re: mkfs.ext2 succeeds despite nbd write errors?
On Sat, Nov 7, 2015 at 3:02 PM, Richard W.M. Jones <rjones@redhat.com> wrote: >> I'm not sure where to start with hunting down why mkfs's pwrite() >> calls aren't failing. I'd look to the kernel source for that? > > It looks like it's really an e2fsprogs problem, not a kernel problem. > That's pretty surprising - I wasn't expecting it. I agree the fsync() issue is an e2fsprogs problem, but as for specifi...
2010 Aug 27
0
[PATCH] Update pwrite to write a full buffer
This patch changes pwrite such that it will never return a short write. This is a backwards compatible API change, as checking for short writes remains correct, but redundant. --- daemon/file.c | 20 +++++++++++++------- src/generator.ml | 6 ------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/d...
2018 Jan 16
1
Re: [nbdkit PATCH 0/7] Initial implementation of FUA flag passthrough
On 01/16/2018 02:25 AM, Richard W.M. Jones wrote: > I had an idea about how we might do this and still keep a single > .pwrite method for plugins. Maybe it's too complicated but here goes: > > > This is binary-compatible with old plugins, but not source compatible, so: > > > (2) Plugsin may optionally define NBDKIT_PLUGIN_LEVEL before including > <nbdkit-plugin.h>. Code wishing to use...
2019 Nov 21
5
Extending the nbdkit python plugin
...n existing Python plugin is here: https://github.com/libguestfs/nbdkit/blob/master/plugins/python/example.py#L1 This morning I tried to modify the plugin to use the newer nbdkit API (version 2). One of the things that would change would be passing flags parameters to some functions, eg: def pwrite (h, buf, offset): might become one of these possibilities (where flags is a bitmask): def pwrite (h, buf, offset, flags): def pwrite (h, buf, offset, flags=0): The problem is if we did this it would break all existing Python plugins. While we don't guarantee the nbdkit API for non-C lan...
2023 Aug 31
0
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...On 8/31/23 10:02, Richard W.M. Jones wrote: > >>> > >>> On Wed, Aug 30, 2023 at 05:21:19PM -0500, Eric Blake wrote: > >>>> I hit another transient failure in libnbd CI when a poorly-written > >>>> eval script did not consume all of stdin during .pwrite. As behaving > >>>> as a data sink can be a somewhat reasonable feature of a > >>>> quickly-written sh or eval plugin, we should not be so insistent as > >>>> treating an EPIPE failure as an immediate return of EIO to the client. > >>> >...
2018 Jan 16
0
Re: [nbdkit PATCH 0/7] Initial implementation of FUA flag passthrough
I had an idea about how we might do this and still keep a single .pwrite method for plugins. Maybe it's too complicated but here goes: (1) Rename the pwrite method as pwrite_old1, and add new pwrite method with either the FUA flag or general flags: int (*pread) (void *handle, void *buf, uint32_t count, uint64_t offset); - int (*pwrite) (void *handle, const v...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...Richard W.M. Jones wrote: > > On Thu, Aug 31, 2023 at 10:40:53AM +0200, Laszlo Ersek wrote: > >> On 8/31/23 00:21, Eric Blake wrote: > >>> I hit another transient failure in libnbd CI when a poorly-written > >>> eval script did not consume all of stdin during .pwrite. As behaving > >>> as a data sink can be a somewhat reasonable feature of a > >>> quickly-written sh or eval plugin, we should not be so insistent as > >>> treating an EPIPE failure as an immediate return of EIO to the client. > >>> > >>>...
2018 Jan 19
2
[nbdkit PATCH] Update filters to support FUA flags.
...n error (including a short read which couldn't be recovered from), C<.pread> should call C<nbdkit_error> with an error message B<and> set C<errno>, then return C<-1>. @@ -333,11 +342,21 @@ message B<and> set C<errno>, then return C<-1>. int (*pwrite) (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle, - const void *buf, uint32_t count, uint64_t offset); + const void *buf, uint32_t count, uint64_t offset, + uint32_t flags); This intercepts the plugin C<.pwrite> met...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
On Thu, Aug 31, 2023 at 10:52:59AM +0100, Richard W.M. Jones wrote: > > > Other plugins (eg written in C) ignore or > > > only partially consume the buffer in pwrite all the time, and that's > > > never a problem. > > > > I don't understand. > > > > https://libguestfs.org/nbdkit-plugin.3.html#pwrite > > > > """ > > The callback must write the whole count bytes if it can. The NBD > &...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
On 8/31/23 10:55, Richard W.M. Jones wrote: > On Thu, Aug 31, 2023 at 10:40:53AM +0200, Laszlo Ersek wrote: >> On 8/31/23 00:21, Eric Blake wrote: >>> I hit another transient failure in libnbd CI when a poorly-written >>> eval script did not consume all of stdin during .pwrite. As behaving >>> as a data sink can be a somewhat reasonable feature of a >>> quickly-written sh or eval plugin, we should not be so insistent as >>> treating an EPIPE failure as an immediate return of EIO to the client. >>> >>> Signed-off-by: Eric Blak...
2018 Sep 10
1
question on nbdkit sh plugin
...gins (where introspection or struct member population) can be used to determine which functionalities are supported, the shell plugin has to implement can_write and friends to return a special status 2 to document not supported, and 3 to indicate false, in part because you can't detect if a pwrite function is present without running it. But since pwrite normally takes additional parameters, could we instead document that nbdkit calling '/path/to/script pwrite <handle>' while intentionally omitting <count> and <offset> is sufficient for that to return specific st...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
On Thu, Aug 31, 2023 at 10:40:53AM +0200, Laszlo Ersek wrote: > On 8/31/23 00:21, Eric Blake wrote: > > I hit another transient failure in libnbd CI when a poorly-written > > eval script did not consume all of stdin during .pwrite. As behaving > > as a data sink can be a somewhat reasonable feature of a > > quickly-written sh or eval plugin, we should not be so insistent as > > treating an EPIPE failure as an immediate return of EIO to the client. > > > > Signed-off-by: Eric Blake <eblake a...
2019 May 28
2
[PATCH] api: Add a special type for the flags argument.
This applies on top of patches 1 & 2 here (instead of patch 3): https://www.redhat.com/archives/libguestfs/2019-May/msg00206.html https://www.redhat.com/archives/libguestfs/2019-May/msg00207.html Rich.
2023 Aug 31
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...0200, Laszlo Ersek wrote: > On 8/31/23 10:02, Richard W.M. Jones wrote: > > > > On Wed, Aug 30, 2023 at 05:21:19PM -0500, Eric Blake wrote: > >> I hit another transient failure in libnbd CI when a poorly-written > >> eval script did not consume all of stdin during .pwrite. As behaving > >> as a data sink can be a somewhat reasonable feature of a > >> quickly-written sh or eval plugin, we should not be so insistent as > >> treating an EPIPE failure as an immediate return of EIO to the client. > > > > I was thinking about this...
2010 Sep 26
2
[PATCH 0/2] Add pwrite-device API call
These two very simple patches add a pwrite-device API call. I have been conservative and not yet added the equivalent pread-device call, although that could be added in future. The motivation for this is in virt-resize: We need a way to zap the partition table cleanly[1], and obviously parted isn't working out for us[2]. Using this c...