xfs
[Top] [All Lists]

Re: [PATCH] bulkstat fixups

To: Lachlan McIlroy <lachlan@xxxxxxx>
Subject: Re: [PATCH] bulkstat fixups
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 21 Nov 2007 15:17:47 +0000
Cc: David Chinner <dgc@xxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <473D1DE0.1090106@sgi.com>
References: <4733EEF2.9010504@sgi.com> <20071111214759.GS995458@sgi.com> <4737C11D.8030007@sgi.com> <20071112041121.GT66820511@sgi.com> <473D1DE0.1090106@sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.3i
+#define XFS_BULKSTAT_UBLEFT(ubleft)    ((ubleft) >= statstruct_size)
+

        I don't think this macro is really helpful.  An inline would
        have been useful if statstruct_size was constant, but this
        way it's much better to just write out the comparism the four
        times it's used.

+       if (!ubcountp || *ubcountp <= 0) {
+               return EINVAL;
+       }

        No need for the braces here.


I also must say I don't like the cond_resched() calls very much.  They
look entirely random to me.  We really should only need cond_resched
when it's absolutely needed, and it deserves a comment why it's needed
then.


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