search for: seek_data

Displaying 20 results from an estimated 41 matches for "seek_data".

2018 Mar 17
0
Terrible share access performance (v.4.8 and current master branch)
...e Samba share on Arch Linux then it severely affects all shares on that host, unrelated to disk where qBittorrent is actually writing. On Arch Linux that smbd process is using 100% of one CPU core time and seems it's blocking because of lseek calls. strace shows full of lseek(47, 1420820480, SEEK_DATA) = 1421344768 lseek(47, 1421344768, SEEK_HOLE) = 1423441920 lseek(47, 1423441920, SEEK_DATA) = 1423966208 lseek(47, 1423966208, SEEK_HOLE) = 1425014784 lseek(47, 1425014784, SEEK_DATA) = 1425539072 lseek(47, 1425539072, SEEK_HOLE) = 1426063360 lseek(47, 142...
2011 May 19
3
SEEK_DATA/HOLE on ocfs2 - v2
Two patches follow this message. One fixes the default implementation of SEEK_HOLE/DATA. This patch applies atop Josef's last posted patch. The second patch implements the same on ocfs2. The test tool for the same is available here. http://oss.oracle.com/~smushran/seek_data/seek_test.c It is improved since the last post. It runs cleanly on zfs, ocfs2 and ext3 (default behavior). Users testing on zfs will need to flip the values of SEEK_HOLE/DATA. The results on ext4 and btrfs are also available here. http://oss.oracle.com/~smushran/seek_data/ Thanks Sunil
2011 May 19
3
SEEK_DATA/HOLE on ocfs2 - v2
Two patches follow this message. One fixes the default implementation of SEEK_HOLE/DATA. This patch applies atop Josef's last posted patch. The second patch implements the same on ocfs2. The test tool for the same is available here. http://oss.oracle.com/~smushran/seek_data/seek_test.c It is improved since the last post. It runs cleanly on zfs, ocfs2 and ext3 (default behavior). Users testing on zfs will need to flip the values of SEEK_HOLE/DATA. The results on ext4 and btrfs are also available here. http://oss.oracle.com/~smushran/seek_data/ Thanks Sunil
2019 Apr 24
2
Re: [PATCH nbdkit v5 FINAL 15/19] file: Implement extents.
On 3/28/19 11:18 AM, Richard W.M. Jones wrote: > This uses lseek SEEK_DATA/SEEK_HOLE to search for allocated data and > holes in the underlying file. > --- > plugins/file/file.c | 141 ++++++++++++++++++++++++++++++++++--- > tests/Makefile.am | 5 ++ > tests/test-file-extents.sh | 57 +++++++++++++++ > 3 files changed, 193 insertions(...
2012 Feb 09
3
[PATCH] Btrfs: return EUCLEAN rather than ENXIO once internal error has occurred for SEEK_DATA/SEEK_HOLE inquiry
By referring to http://linux.die.net/man/2/lseek, return ENXIO only when "offset beyond EOF" for either SEEK_DATA or SEEK_HOLE inquiry. But we return it in case of internal issue too if btrfs_get_extent_fiemap() failed due to other issues. This will confuse the user applications to be expecting ENXIO when trying to find a specific data or hole location once it has occurred. Thanks Dave for pointing that out...
2019 Apr 25
0
Re: [PATCH nbdkit v5 FINAL 15/19] file: Implement extents.
On Wed, Apr 24, 2019 at 02:39:03PM -0500, Eric Blake wrote: > On 3/28/19 11:18 AM, Richard W.M. Jones wrote: > > This uses lseek SEEK_DATA/SEEK_HOLE to search for allocated data and > > holes in the underlying file. > > --- > > plugins/file/file.c | 141 ++++++++++++++++++++++++++++++++++--- > > tests/Makefile.am | 5 ++ > > tests/test-file-extents.sh | 57 +++++++++++++++ > > 3...
2020 Feb 10
2
[nbdkit PATCH 05/10] plugins: Wire up file-based plugin support for NBD_INFO_INIT_STATE
...n state to the client: whether the image contains holes, and whether it is known to read as all zeroes. For file-based plugins, we are already probing lseek(SEEK_HOLE) to learn if extents are supported; a slight tweak to remember if that result is EOF tells us if we are sparse, and a similar lseek(SEEK_DATA) returning ENXIO tells us if the entire file is a hole, with at most two lseek calls during open (rather than one lseek for each of .can_extents, .init_sparse, and .init_zero). The split plugin is similar to file. For partitioning and linuxdisk, we know we are exposing a sparse image. For other f...
2019 Mar 20
0
[PATCH nbdkit 8/8] file: Implement extents.
This uses lseek SEEK_DATA/SEEK_HOLE to search for allocated data and holes in the underlying file. --- plugins/file/file.c | 139 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 129 insertions(+), 10 deletions(-) diff --git a/plugins/file/file.c b/plugins/file/file.c index 628f8fb..22fdfcd 100644 --- a/plugin...
2012 May 08
4
[Bug 8918] New: Use fiemap to quickly detect zero ranges of source file
https://bugzilla.samba.org/show_bug.cgi?id=8918 Summary: Use fiemap to quickly detect zero ranges of source file Product: rsync Version: 3.1.0 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: core AssignedTo: wayned at samba.org
2020 Feb 11
0
Re: [nbdkit PATCH 05/10] plugins: Wire up file-based plugin support for NBD_INFO_INIT_STATE
...te = true; > h->can_zeroout = h->is_block_device; > > + h->can_extents = false; > + h->init_sparse = false; > + h->init_zero = false; > +#ifdef SEEK_HOLE > + if (!h->is_block_device) { > + off_t r; > + > + /* A simple test to see whether SEEK_DATA/SEEK_HOLE are likely to work on > + * the current filesystem, and to see if the image is sparse or zero. > + */ > + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock); > + r = lseek (h->fd, 0, SEEK_DATA); > + if (r == -1) { > + if (errno == ENXIO) { > +...
2011 Feb 16
2
ZFS utility like Filefrag on linux to help analyzing the extents mapping
Hello All, I''d like to know if there is an utility like `Filefrag'' shipped with e2fsprogs on linux, which is used to fetch the extents mapping info of a file(especially a sparse file) located on ZFS? I am working on efficient sparse file detection and backup through lseek(SEEK_DATA/SEEK_HOLE) on ZFS, and I need to verify the result by comparing the original sparse file and the copied file, so if there is such a tool available, it can be used to analyze the start offset and length of each data extent. Thanks in advance! -Jeff
2019 Mar 28
0
[PATCH nbdkit v5 FINAL 15/19] file: Implement extents.
This uses lseek SEEK_DATA/SEEK_HOLE to search for allocated data and holes in the underlying file. --- plugins/file/file.c | 141 ++++++++++++++++++++++++++++++++++--- tests/Makefile.am | 5 ++ tests/test-file-extents.sh | 57 +++++++++++++++ 3 files changed, 193 insertions(+), 10 deletions(-) diff --gi...
2020 Feb 10
1
[nbdkit PATCH] split: Add support for .extents
...zu]=%s: offset=%" PRIu64 ", size=%" PRIu64, i, filenames[i], h->files[i].offset, h->files[i].size); + +#ifdef SEEK_HOLE + /* Test if this file supports extents. */ + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock); + r = lseek (h->files[i].fd, 0, SEEK_DATA); + if (r == -1 && errno != ENXIO) { + nbdkit_debug ("disabling extents: lseek on %s: %m", filenames[i]); + h->files[i].can_extents = false; + } + else + h->files[i].can_extents = true; +#else + h->files[i].can_extents = false; +#endif } h...
2018 Jan 21
2
Re: [PATCH nbdkit] filters: Add copy-on-write filter.
Here's the patch (on top of the preceeding one) which uses a bitmap instead of SEEK_DATA. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org --4VrXvz3cwkc...
2013 Oct 22
1
[PATCH 2/2] Discard unwritten ranges
.../ + data_start = 0; + while (data_start < size) { + hole_start = lseek (ofd, data_start, SEEK_HOLE); + if (hole_start == (off_t) -1) + error (EXIT_FAILURE, errno, "lseek: %s", outputfile); + if (hole_start == size) + break; + data_start = lseek (ofd, hole_start, SEEK_DATA); + if (data_start == (off_t) -1) { + if (errno == ENXIO) + data_start = size; + else + error (EXIT_FAILURE, errno, "lseek: %s", outputfile); + } + if (fallocate (ofd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, hole_start, data_start - hole_start) == -1) +...
2018 Jan 20
4
[PATCH nbdkit] filters: Add copy-on-write filter.
Eric, you'll probably find the design "interesting" ... It does work, for me at least. Rich.
2016 Oct 01
5
[Bug 12305] New: --fallocate and --sparse works wrong
...ill do if making sparse or preallocated area fails with EOPNOTSUPP or so. Detecting holes and preallocated areas may give wrong information since some FSes fake answer. So it should be controllable see: man 2 fallocate for possible modern operations. man 2 lseek: detecting that areas (SEEK_HOLE/SEEK_DATA) -- You are receiving this mail because: You are the QA Contact for the bug.
2020 Apr 09
0
[PATCH nbdkit v2 1/3] file: Move file operators to a new common/fileops mini-library.
...d *handle, uint32_t count, uint64_t offset, + uint32_t flags, struct nbdkit_extents *extents) +{ + struct fileops *fops = handle; + const bool req_one = flags & NBDKIT_FLAG_REQ_ONE; + uint64_t end = offset + count; + + do { + off_t pos; + + pos = lseek (fops->fd, offset, SEEK_DATA); + if (pos == -1) { + if (errno == ENXIO) { + /* The current man page does not describe this situation well, + * but a proposed change to POSIX adds these words for ENXIO: + * "or the whence argument is SEEK_DATA and the offset falls + * within the final...
2019 Mar 23
1
Re: [PATCH nbdkit 8/8] file: Implement extents.
On 3/20/19 5:11 PM, Richard W.M. Jones wrote: > This uses lseek SEEK_DATA/SEEK_HOLE to search for allocated data and > holes in the underlying file. > --- > plugins/file/file.c | 139 ++++++++++++++++++++++++++++++++++++++++---- > 1 file changed, 129 insertions(+), 10 deletions(-) > > -int file_debug_zero; /* to enable: -D file.zero=1 */ &...
2020 Apr 09
1
[PATCH nbdkit PRELIMINARY] file: Move file operators to a new fileops mini-library
There's a lot of code in nbdkit-file-plugin which it would be nice to reuse elsewhere. One possible approach (as outlined here) is simply to move the file callbacks (like file.pread, file.pwrite, file.zero etc) to a new mini-library. They can then be consumed by other plugins fairly easily by doing: static void * foo_open (int readonly) { struct fileops *fops; int fd, flags; /*