cvs commit: src/sys/dev/md md.c

Colin Percival colin.percival at wadham.ox.ac.uk
Mon Mar 1 06:57:23 PST 2004


At 10:02 01/03/2004, Bruce Evans wrote:
>On Sun, 29 Feb 2004, Colin Percival wrote:
> >   Modified files:
> >     sys/dev/md           md.c
> >   Log:
> >   Use DEV_BSIZE byte sectors instead of PAGE_SIZE byte sectors for
> >   swap-backed memory disks.  This reduces filesystem allocation overhead
> >   and makes swap-backed memory disks compatible with broken code (dd,
> >   for example) which expects to see 512 byte sectors.
>
>This was mostly a feature.  It helped expose broken code that wants 512
>byte sectors.

   Well... yes, but I don't think it was an intended feature. :)

>   dd is as far as possible from being an example of such
>code.  It uses the requested block size which just defaults to 512.

   Ideally, dd should look at what it's being asked to access, and get
a default block size from that.  (Yes, there are much worse offenders,
dd just happened to be the first problem which came to mind.)

Colin Percival




More information about the cvs-all mailing list