[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18097.21222.991285.306202@notabene.brown>
Date: Thu, 2 Aug 2007 13:43:34 +1000
From: Neil Brown <neilb@...e.de>
To: "John Stoffel" <john@...ffel.org>
Cc: Tejun Heo <teheo@...e.de>, Avi Kivity <avi@...o.co.il>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 000 of 35] Refactor block layer to improve support for
stacked devices.
On Wednesday August 1, john@...ffel.org wrote:
>
> In any case, why does something so complicated need to be a macro, why
> not a function instead?
There needs to be a macro so you can put a statement after it to be
executed "for each ..."
But you are right that it doesn't all need to be in the one macro.
The idea of something like
#define bio_for_each_segment_offset(bv, bio, _i, offset, _size) \
for (bio_iterator_init(bio, &_i, &bv, offset, _size); \
i.remaining > 0 ; \
bio_next(bio, &_i, &bv))
with bio_iterator_init and bio_next being (inline?) functions is a
very good one. I'll see what works.
Thanks,
NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists