xfs
[Top] [All Lists]

Re: [PATCH 2/7] xfs: fix min bufsize bugs in two places

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH 2/7] xfs: fix min bufsize bugs in two places
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sat, 20 Mar 2010 12:42:49 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <201003182253.o2IMrp54001850@xxxxxxxxxxxxxxxxxxxxxx>
References: <201003182253.o2IMrp54001850@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
> +/* Number of basic blocks in a log sector */
> +#define xlog_sectbb(log) (1 << (log)->l_sectbb_log)

Looking at all uses of (log)->l_sectbb_log I wonder if we should
bother storing this in the log structure in this form, or rather
as the multipler of the basic block size, ala l_sectsize.  All the

        if (log->l_sectbb_log) {

checks would just become

        if (log->l_sectsize > 1) {

and the xlog_find_verify_cycle/xlog_write_log_records checks
would also be a natural

        if (bufblks < log->l_sectsize)

The comments added are defintively useful, btw.

<Prev in Thread] Current Thread [Next in Thread>