lkml.org 
[lkml]   [2008]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 26/26] UBIFS: include FS to compilation
ext Christoph Hellwig wrote:
> On Tue, Apr 01, 2008 at 02:33:37PM +0300, Pekka Enberg wrote:
>> I don't know how many times I have to say this: you're doing it at the
>> wrong level! The reason you want to compile them out is because you've
>> added crap like this all over your code paths:
>>
>> ubifs_assert(PageLocked(page));
>> ubifs_assert(!PageChecked(page));
>> ubifs_assert(!PagePrivate(page));
>>
>> So instead of arguing about this you really ought to look at what
>> SLUB, for example, does. It's perfectly okay to have _debugging
>> checks_ compiled out (stuff like verify_inode and such) but at the
>> assertion level it makes no sense whatsoever!
>
> Yes, having this in filesystems is not very nice.

A technical reason would be more compelling than "not very nice".

> If someone feels
> very strong about interface assertation we should add them at the
> method level boundary so that the interface is verified for all
> filesystems.
>

The checks are not valid for all file systems.

The point of the checks as preconditions is lost if they moved elsewhere.

VFS code paths are not simple, so the suggestion is impractical anyway.


\
 
 \ /
  Last update: 2008-04-28 09:19    [W:0.248 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site