search for: orig_offset

Displaying 16 results from an estimated 16 matches for "orig_offset".

2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
...struct inode *inode, u64 start, u64 end) { + struct btrfs_root *root = BTRFS_I(inode)->root; struct extent_buffer *leaf; struct btrfs_path *path; struct btrfs_file_extent_item *fi; struct btrfs_key key; + struct btrfs_key new_key; u64 bytenr; u64 num_bytes; u64 extent_end; u64 orig_offset; u64 other_start; u64 other_end; - u64 split = start; - u64 locked_end = end; - int extent_type; - int split_end = 1; + u64 split; + int del_nr = 0; + int del_slot = 0; int ret; btrfs_drop_extent_cache(inode, start, end - 1, 0); @@ -644,12 +572,10 @@ int btrfs_mark_extent_written(struct b...
2020 Aug 07
2
[PATCH nbdkit] plugins: file: More standard cache mode names
...@ -423,7 +423,7 @@ file_pread (void *handle, void *buf, uint32_t count, uint64_t offset, #ifdef HAVE_POSIX_FADVISE /* On Linux this will evict the pages we just read from the page cache. */ - if (cache_mode == cache_none) + if (cache_mode == cache_writethrough) posix_fadvise (h->fd, orig_offset, orig_count, POSIX_FADV_DONTNEED); #endif @@ -441,11 +441,11 @@ file_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, uint32_t orig_count = count; uint64_t orig_offset = offset; - /* If cache=none we want to force pages we have just written to the - * file to be...
2020 Aug 07
3
[PATCH nbdkit] file: Implement cache=none and fadvise=normal|random|sequential.
...Start with safe guess */ @@ -329,6 +392,10 @@ file_pread (void *handle, void *buf, uint32_t count, uint64_t offset, uint32_t flags) { struct handle *h = handle; +#if defined (HAVE_POSIX_FADVISE) && defined (POSIX_FADV_DONTNEED) + uint32_t orig_count = count; + uint64_t orig_offset = offset; +#endif while (count > 0) { ssize_t r = pread (h->fd, buf, count, offset); @@ -345,6 +412,12 @@ file_pread (void *handle, void *buf, uint32_t count, uint64_t offset, offset += r; } +#ifdef HAVE_POSIX_FADVISE + /* On Linux this will evict the pages we just read f...
2020 Aug 08
0
Re: [PATCH nbdkit] plugins: file: More standard cache mode names
...(void *handle, void *buf, uint32_t count, uint64_t offset, > > #ifdef HAVE_POSIX_FADVISE > /* On Linux this will evict the pages we just read from the page cache. */ > - if (cache_mode == cache_none) > + if (cache_mode == cache_writethrough) > posix_fadvise (h->fd, orig_offset, orig_count, POSIX_FADV_DONTNEED); > #endif > > @@ -441,11 +441,11 @@ file_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, > uint32_t orig_count = count; > uint64_t orig_offset = offset; > > - /* If cache=none we want to force pages we have j...
2020 Aug 07
3
Re: [PATCH nbdkit] file: Implement cache=none and fadvise=normal|random|sequential.
...gt;@@ -355,6 +428,17 @@ file_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, > > { > > struct handle *h = handle; > >+#if defined (HAVE_POSIX_FADVISE) && defined (POSIX_FADV_DONTNEED) > >+ uint32_t orig_count = count; > >+ uint64_t orig_offset = offset; > >+ > >+ /* If cache=none we want to force pages we have just written to the > >+ * file to be flushed to disk so we can immediately evict them from > >+ * the page cache. > >+ */ > >+ if (cache_mode == cache_none) flags |= NBDKIT_FLAG_FUA; &gt...
2020 Aug 08
1
Re: [PATCH nbdkit] plugins: file: More standard cache mode names
...nt32_t count, uint64_t offset, > > > > #ifdef HAVE_POSIX_FADVISE > > /* On Linux this will evict the pages we just read from the page cache. */ > > - if (cache_mode == cache_none) > > + if (cache_mode == cache_writethrough) > > posix_fadvise (h->fd, orig_offset, orig_count, POSIX_FADV_DONTNEED); > > #endif > > > > @@ -441,11 +441,11 @@ file_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, > > uint32_t orig_count = count; > > uint64_t orig_offset = offset; > > > > - /* If cache=none w...
2020 Aug 07
0
Re: [PATCH nbdkit] file: Implement cache=none and fadvise=normal|random|sequential.
..._DIRECT. > @@ -355,6 +428,17 @@ file_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, > { > struct handle *h = handle; > > +#if defined (HAVE_POSIX_FADVISE) && defined (POSIX_FADV_DONTNEED) > + uint32_t orig_count = count; > + uint64_t orig_offset = offset; > + > + /* If cache=none we want to force pages we have just written to the > + * file to be flushed to disk so we can immediately evict them from > + * the page cache. > + */ > + if (cache_mode == cache_none) flags |= NBDKIT_FLAG_FUA; > +#endif > + >...
2020 Aug 07
0
Re: [PATCH nbdkit] file: Implement cache=none and fadvise=normal|random|sequential.
...write (void *handle, const void *buf, > uint32_t count, uint64_t offset, > > > { > > > struct handle *h = handle; > > >+#if defined (HAVE_POSIX_FADVISE) && defined (POSIX_FADV_DONTNEED) > > >+ uint32_t orig_count = count; > > >+ uint64_t orig_offset = offset; > > >+ > > >+ /* If cache=none we want to force pages we have just written to the > > >+ * file to be flushed to disk so we can immediately evict them from > > >+ * the page cache. > > >+ */ > > >+ if (cache_mode == cache_none)...
2013 Dec 12
1
Dovecot 2.1.7 crash (with core dumped)
...unges = 0} ret = 0 #6 0x000000000040b366 in idle_finish (ctx=0x19a55b0, done_ok=false, free_cmd=false) at cmd-idle.c:38 client = 0x19a48e0 #7 0x000000000040b69c in cmd_idle_continue (cmd=0x19a54c0) at cmd-idle.c:234 client = 0x19a48e0 ctx = 0x19a55b0 orig_offset = 704677 #8 0x0000000000411ffd in command_exec (cmd=0x19a54c0) at imap-commands.c:148 hook = 0x1989cd0 ret = <value optimized out> #9 0x00000000004108da in client_command_cancel (_cmd=0x7fffb9589088) at imap-client.c:136 cmd = 0x19a54c0 cmd_ret = <va...
2011 Jan 07
0
imap crash (with backtrace)
...= {sync_delayed_expunges = 0} ret = 0 #7 0x0805119a in idle_finish (ctx=0x90160d0, done_ok=false, free_cmd=false) at cmd-idle.c:38 client = 0x9015be0 #8 0x08051450 in cmd_idle_continue (cmd=0x9016048) at cmd-idle.c:224 client = 0x9015be0 ctx = 0x90160d0 orig_offset = 771339 #9 0x08056924 in client_command_cancel (_cmd=0xbff2d1ec) at imap-client.c:126 cmd = 0x9016048 cmd_ret = <value optimized out> #10 0x080572cb in client_destroy (client=0x9015be0, reason=<value optimized out>) at imap-client.c:190 cmd = 0x9016048...
2020 Jul 10
24
[PATCH 00/18] Allow architectures to override __READ_ONCE()
Hi all, This is version three of the patches I previously posted here: v1: https://lore.kernel.org/lkml/20191108170120.22331-1-will at kernel.org/ v2: https://lore.kernel.org/r/20200630173734.14057-1-will at kernel.org Changes since v2 include: * Actually add the barrier in READ_ONCE() for Alpha! * Implement Alpha's smp_load_acquire() using __READ_ONCE(), rather than the other
2020 Jun 30
32
[PATCH 00/18] Allow architectures to override __READ_ONCE()
Hi everyone, This is the long-awaited version two of the patches I previously posted in November last year: https://lore.kernel.org/lkml/20191108170120.22331-1-will at kernel.org/ I ended up parking the series while the READ_ONCE() implementation was being overhauled, but with that merged during the recent merge window and LTO patches being posted again [1], it was time for a refresh. The
2020 Jun 30
32
[PATCH 00/18] Allow architectures to override __READ_ONCE()
Hi everyone, This is the long-awaited version two of the patches I previously posted in November last year: https://lore.kernel.org/lkml/20191108170120.22331-1-will at kernel.org/ I ended up parking the series while the READ_ONCE() implementation was being overhauled, but with that merged during the recent merge window and LTO patches being posted again [1], it was time for a refresh. The
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...0) { ret = btrfs_del_items(trans, root, path, del_slot, del_nr); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } btrfs_free_path(path); @@ -685,7 +685,7 @@ again: ret = btrfs_inc_extent_ref(trans, root, bytenr, num_bytes, 0, root->root_key.objectid, inode->i_ino, orig_offset); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); if (split == start) { key.offset = start; @@ -712,7 +712,7 @@ again: ret = btrfs_free_extent(trans, root, bytenr, num_bytes, 0, root->root_key.objectid, inode->i_ino, orig_offset); - BUG_ON(ret); + btrfs_fixable_bug_on(...
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them