Re: [pnfs] [PATCH 5/5] nfsd41: replace page based DRC with buffer based DRC

Benny Halevy
2009-08-30T23:10:56Z

On Aug. 29, 2009, 0:33 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote:
> I think this is OK for now, but maybe stick something like:
>
> BUILD_BUG_ON(NFSD_MAX_SLOTS_PER_SESSION * sizeof(struct nfsd4_slot)
> + sizeof(struct nfsd4_session) > PAGE_SIZE);
>
> in state.h just to warn anyone who wants to blindly bump up

I think that the BUILD_BUG_ON should be placed in a function so
it gets to compile, so it'd better be defined here and not in state.h
(where it also is in the right context)

Benny

> NFSD_MAX_SLOTS_PER_SESSION. (It's not really forbidden to kmalloc more
> than a page, but it's also not reliable, and if it becomes necessary
> then we'd rather find some way to code around it.)
>
>