Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2002 06:55:59 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Nik Clayton <nik@freebsd.org>
Cc:        Dag-Erling Smorgrav <des@ofug.org>, Wes Peters <wes@softweyr.com>, Dan Moschuk <dan@freebsd.org>, arch@freebsd.org
Subject:   Re: Package system flaws?
Message-ID:  <3D30316F.DCFBB407@mindspring.com>
References:  <20020706220511.GA88651@scoobysnax.jaded.net> <3D27A296.D58FB4B4@softweyr.com> <xzplm8nrgse.fsf@flood.ping.uio.no> <20020707145116.GC5610@canyon.nothing-going-on.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Nik Clayton wrote:
> On Sun, Jul 07, 2002 at 12:09:05PM +0200, Dag-Erling Smorgrav wrote:
> > One thing we could improve a lot is the package file format.  We
> > currently use gzipped tarballs, which have to be completely unpacked
> > before processing can begin.  One improvement we can make is to use an
> > archive format such as zip that allows us to extract individual files
> > quickly, so we can extract the metadata and check dependencies
> > etc. without unpacking the entire package.
> 
> gzipped UFS filesystem images that can be mounted on a vn/md device. . .

The "md" devices have a nasty lockup which was recently run
down because it originally looked like a tuning problem.  See
the -hackers list for details.  It's basically a race with a
race to root, and happens if two images are in the same directory,
as they would be if you were installing package images from the
/usr/ports/distfiles directory.

Basically, it's possible to deadlock because the device is
locked and the device the device is on is locked, and they
aren't in the same deadlock avoidance space.

The proper fix is probably to add a VFSOP to get an RLE
encoded list of raw sectors for a file configured as an md
device backing object, and then use that to translate sector
requests into sector requests on the underlying device, rather
than running the whole thing through the file system a second
time.  You would need to lock the file before you started doing
this, so that it couldn't be extended accidently.  That would
avoid the deadlock.

It would also be really useful for swapping on a file, FWIW.
You could even make it work with sparse files, this way...

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D30316F.DCFBB407>