[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] Re: [RFC][PATCH 2/4] dm-log: unify rw_header to read/write_header



On Tue, Nov 25, 2008 at 07:01:39PM -0500, Takahiro Yasui wrote:
> rw_header function updates three members of io_req data every time
> when I/O is processed. bi_rw and notify.fn are never modified once
> they get initialized, and also they can be set in advance.
> This patch removes unnecessary update operations.
 
Indeed.

And it also removes header_to_disk() from the disk_flush() code
path but doesn't mention changing that:-)  I assume that's also
OK because there'll always have been a resume before the flush
and the data can only change during a resume?
 
> +++ linux-2.6.28-rc4/drivers/md/dm-log.c
> @@ -323,20 +323,13 @@ static void header_from_disk(struct log_

> -static int rw_header(struct log_c *lc, int rw)

I reckon that little function improves readability/maintainability and I've
left it in.

http://www.kernel.org/pub/linux/kernel/people/agk/patches/2.6/editing/
    dm-log-avoid-reinitialising-io_req-on-every-operation.patch

Alasdair
-- 
agk redhat com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]