[Top][All Lists]

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

Re: Partitions whith length % 4096 != 0

From: Andrew Clausen
Subject: Re: Partitions whith length % 4096 != 0
Date: Sat, 24 Apr 2004 12:02:41 +1000
User-agent: Mutt/

On Fri, Apr 23, 2004 at 10:23:40PM +0200, address@hidden wrote:
> I was wondering whether I need to make black (white?) magic
> to write end of a partition which doesn't have a size % 4096
> bytes != 0 when using open on the partition device and write
> on Linux 2.4.25 or 2.4.26. I'm debugging a port of newfs_hfs
> for linux (for hfs parted regression tests), which writes
> 4096 bytes at the end of a partition (let's say at offest
> 'o'), and the write fails writing only 'n' bytes, where
> '(o+n)%4096==0' and 'n<=4096'
> Anybody has an idea ?


(1) you might need to use that read/write-last-sector ioctl.  (dd should
do this - so use dd?).  See libparted/linux.c, _write_lastoddsector().
(Note: there is a patch pending against this stuff)

(2) set the blocksize to 512 bytes?  I don't think there's an ioctl to
do this, but you could hack one in for your tests (yuck!).  The function
you need is: set_blocksize() in fs/block_dev.c.
        That said, I would like to run your tests too.

(3) use 2.6.x.


reply via email to

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