Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2005 06:57:15 -0700
From:      Scott Long <scottl@samsco.org>
To:        Doug White <dwhite@gumbysoft.com>
Cc:        Doug White <dwhite@FreeBSD.org>, cvs-src@FreeBSD.org, Poul-Henning Kamp <phk@phk.freebsd.dk>, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern vfs_subr.c src/sys/fs/devfs devfs_vnops.c
Message-ID:  <437351BB.6000103@samsco.org>
In-Reply-To: <20051109225823.Y62099@carver.gumbysoft.com>
References:  <1547.1131574569@critter.freebsd.dk> <20051109225823.Y62099@carver.gumbysoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Doug White wrote:
> On Wed, 9 Nov 2005, Poul-Henning Kamp wrote:
> 
> 
>>In message <200511092203.jA9M3omu013054@repoman.freebsd.org>, Doug White writes
>>:
>>
>>
>>> This is a workaround for a complicated issue involving VFS cookies and devfs.
>>> The PR and patch have the details. The ultimate fix requires architectural
>>> changes and clarifications to the VFS API, [...]
>>
>>The proper fix is to put the cookie in the dirent and abandon the
>>microoptimization that UFS/FFS stores struct dirent directly on
>>the disk.
> 
> 
> It would be nice if you guys could sit down and figure out just which
> "proper fix" you want implemented, since everyone seems to have their own
> ideas.
> 

Putting the cookie into the dirent means either changing the size of the
dirent struct and breaking the userland ABI (almost as bad as changing
the size of stat, but not quite), or making a 'kdirent' struct and then
manually shifting and copying it to a dirent struct.  Since the dirent
struct is copied directly into the uio buffer by the filesystem code and
not actually consumed by the caller of VOP_READDIR, it means that every
filesystem would have to be messed with. Neither of these 'solutions' is
very appealling, and I don't understand why the whole kernel and/or
userland needs to pay a penalty because of devfs.  Cookie handling is
not a hard problem nor does it take a signficant amount of code.

What I really think this is is a ploy by PHK to get someone motivated to
fix it for him ;-)

Scott



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?437351BB.6000103>