| To: | Brian Foster <bfoster@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH v2 05/17] xfs: create macros/helpers for dealing with sparse inode chunks |
| From: | Fanael Linithien <fanael4@xxxxxxxxx> |
| Date: | Tue, 4 Nov 2014 00:56:17 +0100 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CV4WihXUIXNbGDSBQuqOzdd772ya1DHNFkTbDjSQxlU=; b=mTt/YWPjvAI6DRM5LSo76vHLIVbWObmhRYAijXPBR3VsWSPYwBXBr78MjfNuT/JDzD q95B6rgIRAfGYNZ3Mxb67yr/XOmSW+1+CSeAt7/pb2uBV3RIxw+CXpaIAABq2mwy0WOz 3RfOsPxDy+easkDz3rWrzSExriRoRGDA9qfl6R8w6g+LiqGJRYQEeMo1A5yQ3LK5iiIm Dz8Vcndsun2WCiPluupqYP6K3EndwJ79iIxNa13TYpGXH+ti+j0QlFyhNy6qndB7TL7z asnseZ6mQP511fjzNbBLuIITsTftOut7CrQweV7ahNXyr+lUcqUgxHWJEqmahDIxACOJ wvDA== |
| In-reply-to: | <20141103223407.GA14732@xxxxxxxxxxxxxxx> |
| References: | <1415031146-9107-1-git-send-email-bfoster@xxxxxxxxxx> <1415031146-9107-6-git-send-email-bfoster@xxxxxxxxxx> <CA+o=1OWm3XWUgNXR1_CravnEBL8fD8dwyMvY4CN9rbAsw0Q4Sw@xxxxxxxxxxxxxx> <20141103223407.GA14732@xxxxxxxxxxxxxxx> |
2014-11-03 23:34 GMT+01:00 Brian Foster <bfoster@xxxxxxxxxx>:
> On Mon, Nov 03, 2014 at 11:12:12PM +0100, Fanael Linithien wrote:
>> 2014-11-03 17:12 GMT+01:00 Brian Foster <bfoster@xxxxxxxxxx>:
>> >
>> > +static inline bool xfs_inobt_issparse(uint16_t holemask)
>> > +{
>> > + return holemask == 0 ? false : true;
>> > +}
>>
>> Surely that should be "return holemask != 0;"?
>>
>
> ir_holemask bits are set for holes in the inode chunk and unset for
> allocated regions. This means that ir_holemask == 0 for a normal,
> fully-allocated chunk and != 0 otherwise (some bits are set to indicate
> the chunk has a hole). Check out the commit log for patch 4 for
> reasoning.
Oh, I don't comment on the logic, as I don't really know much about
XFS code. It's purely a stylistic suggestion: "holemask == 0 ? false :
true" looks entirely equivalent to "holemask != 0".
|
| Previous by Date: | Re: [PATCH v2 05/17] xfs: create macros/helpers for dealing with sparse inode chunks, Brian Foster |
|---|---|
| Next by Date: | Re: clone of filesystem across network preserving ionodes, Peter Grandi |
| Previous by Thread: | Re: [PATCH v2 05/17] xfs: create macros/helpers for dealing with sparse inode chunks, Brian Foster |
| Next by Thread: | Re: [PATCH v2 05/17] xfs: create macros/helpers for dealing with sparse inode chunks, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |