Re: [RFC][PATCH 14/14] tmpfs whiteout support

Hugh Dickins
2007-05-14T19:35:51Z

On Mon, 14 May 2007, Jan Blunck wrote:
> On 5/14/07, Hugh Dickins <hugh@veritas.com> wrote:
> > >
> > > /* Pretend that each entry is of this size in directory's i_size */
> > > -#define BOGO_DIRENT_SIZE 20
> > > +#define BOGO_DIRENT_SIZE 1
> >
> > Why would that change be needed for whiteout support?
>
> Good question. It seems that this a survivor of the changes necessary
> for union readdir.

(I'd be asking the same question in that case, but don't worry about it!)

> This isn't necessary for white-outs.

Phew, thanks, please drop that hunk.

> BTW: Why do we claim this to be 20??? Is there any meaning behind this?

No great meaning, hence "BOGO". I put that in when hpa (IIRC) found
tmpfs directory size 0 didn't suit some apps. I thought it would be
nice to have a size which indicates the current number of entries
(which your 1 would do), looks plausible (for short filenames),
and easy to make sense of in an "ls -l". Bogus, yes; but I'd
resist changing it after all this time, without very good reason.

Hugh