[dm-devel] [PATCH 6/6] dm-snapshot: use bufio prefetch

Mikulas Patocka mpatocka at redhat.com
Tue Jan 14 20:43:16 UTC 2014



On Tue, 14 Jan 2014, Mike Snitzer wrote:

> On Mon, Jan 13 2014 at  7:14pm -0500,
> Mikulas Patocka <mpatocka at redhat.com> wrote:
> 
> > +	dm_bufio_set_minimum_buffers(client, DM_PREFETCH_CHUNKS + 1);
> > +
> 
> Why the +1?  I'd prefer that be managed in dm-bufio rather than relying
> on all callers to know to add +1.
> 
> Can you supply a followup patch that cleans this up in bufio and remove
> the +1 in the above dm_bufio_set_minimum_buffers call?

If DM_PREFETCH_CHUNKS is 12, we need 13 buffers in dm-bufio (one for the 
current buffer that is being read and 12 read ahead buffers).

It is correct to have +1 in snapshot code, not in dm-bufio code.

Mikulas




More information about the dm-devel mailing list