search for: seek_data

Displaying 20 results from an estimated 47 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
2025 Mar 07
4
Support for transferring sparse files via scp/sftp correctly?
...gt; > _______________________________________________ > > > openssh-unix-dev mailing list > > > openssh-unix-dev at mindrot.org > > > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev > > > > I think one of the issues you are going to face is that SEEK_DATA and > > SEEK_HOLE don't seem to be currently supported under OpenBSD. Since > > that's the home OS for OpenSSH this could create portability issues. > > While you can get around that with the judicious use of defines it means > > that the feature set will start to sh...
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...
2025 Apr 04
2
Support for transferring sparse files via scp/sftp correctly?
...ERY_ALLOCATED_RANGES that returns an array of offset and length values, within a given range in a file (also specified by offset and length). So, it?s almost a direct mapping to the extension I proposed. I basically have three different versions of a request_ranges() function (Windows, systems with SEEK_DATA/SEEK_HOLE, and a dummy implementation for all other platforms which just returns the full range passed in). > > The risk of missing data due to file changes is no different than what could happen if you were reading data sequentially and something did a write to the source file after you had...
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
2025 Mar 29
1
Support for transferring sparse files via scp/sftp correctly?
On Mar 6, 2025, at 9:38?PM, Damien Miller <djm at mindrot.org> wrote: > If you want this to happen, I recommend starting by figuring out what > protocol extensions need to be made, and how to support sparse files > on system without SEEK_DATA/HOLE - it should be pretty to do this on > upload without these flags and without extensions. I was inspired by this thread to add sparse file support to AsyncSSH, on OSes that support SEEK_DATA and SEEK_HOLE. It looks like I should also be able to get this to work on Windows with FSCTL_QUERY_...
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...
2025 Apr 04
1
Support for transferring sparse files via scp/sftp correctly?
...ERY_ALLOCATED_RANGES that returns an array of offset and length values, within a given range in a file (also specified by offset and length). So, it?s almost a direct mapping to the extension I proposed. I basically have three different versions of a request_ranges() function (Windows, systems with SEEK_DATA/SEEK_HOLE, and a dummy implementation for all other platforms which just returns the full range passed in). The risk of missing data due to file changes is no different than what could happen if you were reading data sequentially and something did a write to the source file after you had already c...
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) +...
2025 Apr 05
1
Support for transferring sparse files via scp/sftp correctly?
...r existing file buffer with a > block of zeros and skipping the write if it matches. OpenBSD's cp(1) does > this (look for "skipholes"): > https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/cp/utils.c?annotate=HEAD > . > > This should not be done. Either a system has SEEK_DATA/SEEK_HOLE, > Win32 (Windows&ReactOS) FSCTL_QUERY_ALLOCATED_RANGES, or just copy all > bytes. If there's a protocol extension I'd like for it to be able to support other use cases, not just the one you care about. -- Darren Tucker (dtucker at dtucker.net) GPG key 11EAA6FA / A86...