search for: num_extent_pages

Displaying 7 results from an estimated 7 matches for "num_extent_pages".

2010 Jul 13
0
[PATCH 1/2] btrfs: restructure try_release_extent_buffer()
...cache_free(extent_buffer_cache, eb); } +/* + * Helper for releasing extent buffer page. + */ +static void btrfs_release_extent_buffer_page(struct extent_buffer *eb, + unsigned long start_idx) +{ + unsigned long index; + struct page *page; + + if (!eb->first_page) + return; + + index = num_extent_pages(eb->start, eb->len); + if (start_idx >= index) + return; + + do { + index--; + page = extent_buffer_page(eb, index); + if (page) + page_cache_release(page); + } while (index != start_idx); +} + +/* + * Helper for releasing the extent buffer. + */ +static inline void btrfs_release_ext...
2012 Dec 18
0
[PATCH] [RFC] Btrfs: Subpagesize blocksize (WIP).
...+ struct extent_buffer **eb_head) +{ + struct extent_buffer *eb_cur; + struct extent_buffer *eb_temp; + struct page *page; + int mapped = !test_bit(EXTENT_BUFFER_DUMMY, &eb->bflags); + int ret = 0; + + if (extent_buffer_under_io(eb)) + BUG_ON(1); + + // ...is this even possible? + if (!num_extent_pages(eb->start, eb->len)) { + WARN_ON(1); + return ret; + } + + page = extent_buffer_page(eb, 0); + if (page && mapped) { + spin_lock(&page->mapping->private_lock); + /* + * We do this since we''ll remove the pages after we''ve + * removed the eb from the...
2010 Mar 03
1
[PATCH V2] Btrfs: add direct I/O helper to process inline compressed extents.
...((unsigned long)PAGE_CACHE_SIZE - 1); + + WARN_ON(start > eb->len); + WARN_ON(start + len > eb->start + eb->len); + + vec->bv_page = extent_buffer_page(eb, i); + vec->bv_offset = offset; + vec->bv_len = min(len, (PAGE_CACHE_SIZE - offset)); +} + static inline unsigned long num_extent_pages(u64 start, u64 len) { return ((start + len + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) - diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 36de250..c8c129b 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -2,6 +2,7 @@ #define __EXTENTIO__ #include <linux/...
2011 Jun 10
6
[PATCH v2 0/6] btrfs: generic readeahead interface
This series introduces a generic readahead interface for btrfs trees. The intention is to use it to speed up scrub in a first run, but balance is another hot candidate. In general, every tree walk could be accompanied by a readahead. Deletion of large files comes to mind, where the fetching of the csums takes most of the time. Also the initial build-ups of free-space-caches and
2011 Aug 15
9
[patch v2 0/9] btrfs: More error handling patches
Hi all - The following 9 patches add more error handling to the btrfs code: - Add btrfs_panic - Catch locking failures in {set,clear}_extent_bit - Push up set_extent_bit errors to callers - Push up lock_extent errors to callers - Push up clear_extent_bit errors to callers - Push up unlock_extent errors to callers - Make pin_down_extent return void - Push up btrfs_pin_extent errors to
2011 Jun 29
14
[PATCH v4 0/6] btrfs: generic readeahead interface
This series introduces a generic readahead interface for btrfs trees. The intention is to use it to speed up scrub in a first run, but balance is another hot candidate. In general, every tree walk could be accompanied by a readahead. Deletion of large files comes to mind, where the fetching of the csums takes most of the time. Also the initial build-ups of free-space-caches and
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