search for: file_extents

Displaying 20 results from an estimated 33 matches for "file_extents".

2013 Jun 04
3
[PATCH] Btrfs: fix broken nocow after balance
Balance will create reloc_root for each fs root, and it''s going to record last_snapshot to filter shared blocks. The side effect of setting last_snapshot is to break nocow attributes of files. So it turns out that checking last_snapshot does not always ensure that a node/leaf/file_extent is shared. That''s why shared node/leaf needs to search extent tree for number of
2019 Feb 14
1
Proposed function file.backup
Dear R Core: In the kutils package, I wrote a function that is so handy that I would like to ask you put it in R itself. file.backup() will look at a file, find its last modification time, and create a new backup with a name that appends YYYYMMDD-HHMM to the file name. So now, whenever I worry that running write.csv or saving a graph might destroy something valuable, I use an idiom like fn
2019 Mar 20
0
[PATCH nbdkit 8/8] file: Implement extents.
...*/ + if (pos > offset) { + if (nbdkit_add_extent (extents, offset, pos - offset, + 0 /* allocated data */) == -1) + return -1; + if (req_one) + break; + } + + offset = pos; + } while (offset < end); + + return 0; +} + +static int +file_extents (void *handle, uint32_t count, uint64_t offset, + uint32_t flags, struct nbdkit_extents *extents) +{ + int r; + + pthread_mutex_lock (&lseek_lock); + r = do_extents (handle, count, offset, flags, extents); + pthread_mutex_unlock (&lseek_lock); + + return r; +} +#endif /* S...
2011 Oct 18
2
patch proposal: omindex library or daemon
Olly (looking at commit logs, I think this is your dept :-) For apps which re/index files frequently and need format conversion, I'd like to propose a patch for one of... Omindex library (thread safe): Omindex::init(options) // struct Omindex::options { ... } initialize mime_map, store default options session = new Omindex::Session(db_pathname) user threads use different sessions
2019 Mar 28
0
[PATCH nbdkit v5 FINAL 15/19] file: Implement extents.
...*/ + if (pos > offset) { + if (nbdkit_add_extent (extents, offset, pos - offset, + 0 /* allocated data */) == -1) + return -1; + if (req_one) + break; + } + + offset = pos; + } while (offset < end); + + return 0; +} + +static int +file_extents (void *handle, uint32_t count, uint64_t offset, + uint32_t flags, struct nbdkit_extents *extents) +{ + int r; + + pthread_mutex_lock (&lseek_lock); + r = do_extents (handle, count, offset, flags, extents); + pthread_mutex_unlock (&lseek_lock); + + return r; +} +#endif /* S...
2015 Oct 13
0
[PATCH 1/2] ldlinux: fix stack overflow when running COM32 modules
From: Sylvain Gault <sylvain.gault at gmail.com> When a COM32 module exits, the functions never return and a new call to ldlinux_enter_command is made. This could fill the stack and overflow on some data present in memory. This patch use setjmp/longjmp to return to the main function and restart from there when a COM32 module exits. Signed-off-by: Sylvain Gault <sylvain.gault at
2020 Feb 10
2
[nbdkit PATCH 05/10] plugins: Wire up file-based plugin support for NBD_INFO_INIT_STATE
...filesystem. - */ - ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock); - r = lseek (h->fd, 0, SEEK_HOLE); - if (r == -1) { - nbdkit_debug ("extents disabled: lseek: SEEK_HOLE: %m"); - return 0; - } - return 1; + return h->can_extents; } static int @@ -622,6 +661,23 @@ file_extents (void *handle, uint32_t count, uint64_t offset, ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock); return do_extents (handle, count, offset, flags, extents); } + +/* Initial state. */ +static int +file_init_sparse (void *handle) +{ + struct handle *h = handle; + + return h->init_sparse;...
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
Hi, I just pushed out changes that fix pretty much all the compiler build warnings on the elflink branch. Also, I've added "auto extension" support so that if the user doesn't type the file name extension it will automatically be looked up, e.g. now typing "ls" will execute "ls.c32". The following changes since commit
2019 Mar 23
1
Re: [PATCH nbdkit 8/8] file: Implement extents.
...ata without calling .extents, and NBDKIT_EXTENT_NATIVE (requires .extents, and lets the plugin do all the work). Then, when lseek(SEEK_HOLE) returns EOF, we can return NBDKIT_EXTENT_EMULATE instead of having to track our optimization of skipping lseek in .extents ourselves. > +static int > +file_extents (void *handle, uint32_t count, uint64_t offset, > + uint32_t flags, struct nbdkit_extents *extents) > +{ > + int r; > + > + pthread_mutex_lock (&lseek_lock); > + r = do_extents (handle, count, offset, flags, extents); > + pthread_mutex_unlock (&lseek_lo...
2019 Apr 23
0
[nbdkit PATCH 4/4] plugins: Utilize ACQUIRE_LOCK_FOR_CURRENT_SCOPE
...; - size = block_device_size (h->fd); - pthread_mutex_unlock (&lseek_lock); - return size; + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock); + return block_device_size (h->fd); } else { /* Regular file. */ struct stat statbuf; @@ -607,13 +604,8 @@ static int file_extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags, struct nbdkit_extents *extents) { - int r; - - pthread_mutex_lock (&lseek_lock); - r = do_extents (handle, count, offset, flags, extents); - pthread_mutex_unlock (&lseek_lock); - - return r; + ACQUIRE_LOCK...
2015 Oct 13
5
[PATCH 0/2] Stack overflows when running commands
From: Sylvain Gault <sylvain.gault at gmail.com> Hello there, I propose 2 patches that fix two possible stack overflows either when running a COM32 module or when loading a new config file. I didn't find a better way to do this than to use the infamous setjmp/longjmp functions to restore the stack to a previous state. This makes the logic a bit more complex, but the behavior is not
2004 Feb 06
4
memory reduction
As those of you who watch CVS will be aware Wayne has been making progress in reducing memory requirements of rsync. Much of what he has done has been the product of discussions between he and myself that started a month ago with John Van Essen. Most recently Wayne has changed how the file_struct and its associated data are allocated, eliminating the string areas. Most of these changes have been
2016 Mar 20
0
[PATCH 0/1] EFI image booting capabilities
On Fri, Feb 20, 2015 at 8:08 AM, Patrick Masotta via Syslinux <syslinux at zytor.com> wrote: > This patch adds to the core EFI image booting capabilities. > It was tested on VMware EFI clients and HP Elitebook EFI notebooks, > only on PXE environments but it should work on non-PXE scenarios as well. > > Feedback appreciated. If you've made any changes to this, I'd
2020 Apr 09
0
[PATCH nbdkit v2 1/3] file: Move file operators to a new common/fileops mini-library.
...*/ - if (pos > offset) { - if (nbdkit_add_extent (extents, offset, pos - offset, - 0 /* allocated data */) == -1) - return -1; - if (req_one) - break; - } - - offset = pos; - } while (offset < end); - - return 0; -} - -static int -file_extents (void *handle, uint32_t count, uint64_t offset, - uint32_t flags, struct nbdkit_extents *extents) -{ - ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock); - return do_extents (handle, count, offset, flags, extents); -} -#endif /* SEEK_HOLE */ - -#if HAVE_POSIX_FADVISE -/* Caching. */ -...
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; /*
2020 Aug 07
0
[nbdkit PATCH 2/4] file: Add .list_exports support
...n * the current filesystem. */ - ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock); + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock); r = lseek (h->fd, 0, SEEK_HOLE); if (r == -1) { nbdkit_debug ("extents disabled: lseek: SEEK_HOLE: %m"); @@ -628,7 +712,7 @@ static int file_extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags, struct nbdkit_extents *extents) { - ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lseek_lock); + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock); return do_extents (handle, count, offset, flags, extents); } #endif /* SEEK_HOLE...
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.
2015 Feb 20
6
[PATCH 0/1] EFI image booting capabilities
This patch adds to the core EFI image booting capabilities. It was tested on VMware EFI clients and HP Elitebook EFI notebooks, only on PXE environments but it should work on non-PXE scenarios as well. Feedback appreciated. Best, Patrick Signed-off-by: Patrick Masotta <masottaus at yahoo.com> --- diff -uprN a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c ---
2012 Jul 16
5
[PATCH 0/5] Deleting __intcall() from Syslinux
From: Matt Fleming <matt.fleming at intel.com> Since we can't use __intcall() for EFI, and since we can now have the ELF module code resolve all our symbols at runtime, we should delete as many references to __intcall() as possible and just access the symbols directly. The most interesting patch is the support for weak symbols. We need to be able to reference derivative-specific
2012 Aug 14
1
[GIT PULL] elflink fixes
Hi Peter, The main part of this pull request includes commits that try to replace as many __intcall() invocations as possible. Some remain, but not many (and eventually they'll be gone too). There's also a patch to make better use of ld's --as-needed option and various other bug fixes/cleanups. The following changes since commit ff7334a2ce536b7f4b1f6d6f93ff4e285a3bd45a: Only