public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/01] Btrfs: add decompression code for direct I/O.
@ 2010-01-08 17:10 jim owens
  0 siblings, 0 replies; only message in thread
From: jim owens @ 2010-01-08 17:10 UTC (permalink / raw)
  To: linux-btrfs

The following patch has the btrfs code changes/additions needed
to support reading compressed data in my directio code.

The code always runs in process context.

The callbacks:

int (*get_next_in)(struct bio_vec *vec, struct btrfs_inflate *icb);
int (*get_next_out)(struct bio_vec *vec, struct btrfs_inflate *icb);

track where we currently are in the compressed pages (get_next_in) and
uncompressed output user pages (get_next_out).  (in) is always full pages,
(out) may be partial pages with offsets as the user input to direct I/O is
a set of memory vectors/lengths.

The callback:

void (*done_with_out)(struct bio_vec *vec, struct btrfs_inflate *icb);

is currently coded in directio as:

static void btrfs_dio_done_with_out(struct bio_vec *ovec,
				struct btrfs_inflate *icb)
{
	flush_dcache_page(ovec->bv_page);
	if (!PageCompound(ovec->bv_page))
		set_page_dirty_lock(ovec->bv_page);
	page_cache_release(ovec->bv_page);
}

Again, this patch has no value without my directio code.

jim

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-08 17:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08 17:10 [RFC PATCH 00/01] Btrfs: add decompression code for direct I/O jim owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox