On Tue, 16 Jan 2007, Paul Menage wrote:
> On 1/15/07, Christoph Lameter <clameter@xxxxxxx> wrote:
> >
> > This solution may be a bit hokey. I tried other approaches but this
> > one seemed to be the simplest with the least complications. Maybe someone
> > else can come up with a better solution?
>
> How about a 64-bit field in struct inode that's used as a bitmask if
> there are no more than 64 nodes, and a pointer to a bitmask if there
> are more than 64 nodes. The filesystems wouldn't need to be involved
> then, as the bitmap allocation could be done in the generic code.
How would we decide if there are more than 64 nodes? Runtime or compile
time?
If done at compile time then we will end up with a pointer to an unsigned
long for a system with <= 64 nodes. If we allocate the nodemask via
kmalloc then we will always end up with a mininum allocation size of 64
bytes.