svn commit: r344562 - head/sys/ufs/ffs

Warner Losh imp at bsdimp.com
Wed Feb 27 03:32:40 UTC 2019


On Tue, Feb 26, 2019, 12:49 AM Rodney W. Grimes <
freebsd at pdx.rh.cn85.dnsmgr.net> wrote:

> > On Mon, 25 Feb 2019, Jason Harmening wrote:
> >
> > > On 2/25/19 9:46 PM, Bruce Evans wrote:
> > >>
> > >> block_size <= PAGE_SIZE is very uncommon for ffs, even on systems
> with
> > >> large
> > >> pages.  MINBSIZE is 4096 in ffs (except in my version, it is 512).
> The
> > >> default is 32768 in newfs.  I consider this excessive and only use it
> for
> > >> file systems with many files larger than 1GB, but it is the most
> common
> > >> size.
> > >> It is larger than the large page size of 8192.
> > >
> > > I think this is a case of filesystem logical block size vs. media
> sector
> > > size, right?  Here we're checking the devvp's block size, which I
> think
> > > should correspond to the sector size.  I'd expect cases of that being
> > > greater than PAGE_SIZE to be uncommon, in fact geli warns when that is
> the
> > > case.   I probably should've made that clearer in the commit message.
> >
> > Yes, I missed that you are checking devvp.  ffs_getpages() also checks
> > devvp.
> >
> > So the bug has nothing to do with file system logical (fragment) or i/o
> > (block) block size's, except file systems themselves won't work unless
> > their i/o size is a multiple of the underlying devices (sector) i/o size.
> >
> > Are there physical disk with sector size > PAGE_SIZE now?
>
> I have been told that there are some sd/flash devices that
> have a 16k physical sector size, I have not been able to
> confirm that information though.
>

There are a number of drives that report 16k physical, but 4k sector size.
Others vendors have suggested that 32k or 64k may be on the horizon. But
all these drives still report an LBA size of 4k.

The drive vendors I've talked to have indicated that a larger sector size
is in the works, but so far they haven't indicated what that newer size
will wind up being, or when it would appear in the market...

The timing of when may be unknown, but it's quite likely the future will
have to cope with a mismatch.

Warner

> It is easy to
> > create virtual (md) disks with sector size > PAGE_SIZE, and this may even
> > be useful for avoiding the related problem of having to access large fs
> > blocks to do i/o to small md sectors.  I think it is best to use
> PAGE_SIZE
> > blocks in all layers and sometimes combine these into clusters.
> >
> > Bruce
> --
> Rod Grimes
> rgrimes at freebsd.org
>
>


More information about the svn-src-head mailing list