[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] ext2fs and large stores (> 1.5G)

From: Ognyan Kulev
Subject: [PATCH] ext2fs and large stores (> 1.5G)
Date: Sun, 20 Apr 2003 17:16:37 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030327 Debian/1.3-4

I'm very pleased to announce the availability of an _alpha-quality_ patch that solves one of the most irritating inconveniences in the Hurd.

Getting the Patch


Using the Modified ext2fs

Apply the patch to the latest Hurd source and compile the ext2fs translator. You can put it in /hurd/ext2fs-alfa, for example. Read-only mode should be stable. Read-write mode can _corrupt data_. Always use ext2fs-alfa as active translator.

Bug Reports

When reporting bugs, please include the debug output of the translator (compressed with bzip2 -9). Use the following command:

$ settrans -a test /hurd/ext2fs-alfa -D /dev/hdXsY 2> test.debug

Don't fill mailboxes with large bzip2 files. Put them somewhere in Internet, or send them as private mail to me (address@hidden).

Patches are even better :-)


The idea outlined in http://lists.debian.org/debian-hurd/2003/debian-hurd-200302/msg00016.html is used. A very short description of the implementation follows.

To achieve this, ext2fs reads the superblock very early with store_read. This allows the exact places of all the meta blocks at fixed locations to be calculated. A mapping is created (with the help of disk_image_bptr and disk_image_boffs) in the beginning of disk_image. (See disk_pager_init.)

The rest of disk_image is used as block cache for indirect blocks. Code that uses indirect block must use disk_image_request and disk_image_release. disk_image_request first checks if the block is already in the memory, and if it's not, then allocate it from the block cache.

When using disk_image_release for modified blocks, they are marked as "dirty". The actual write of the block happens in the pokel or sync_global_ptr which call disk_image_clear. disk_image_clear clears the dirty flag of the block thus allowing it to be reused.

To Do

* block sizes different than 4096 are not supported. Don't try it! Discussion about this issue is welcomed, as I didn't think about this yet.


The beta release of the patch will solve the block size limit.

I would like to see ext2fs server without the 1G limit into the Hurd source tree. If the core developers want changes to this patch, let's discuss them.


The implementation took 2 weeks. It was easier than porting CMD649 ATA-100 PCI driver to OSKit, and much more fun too :-)

Ognyan Kulev <address@hidden>, "\"Programmer\""

reply via email to

[Prev in Thread] Current Thread [Next in Thread]