0 bytes sized file can't be written to a HAMMER partition

Jonathan Stuart jstuart at vmware.com
Tue Jun 10 06:27:27 PDT 2008


It looks like the code should be changed to:

if (uio->uio_offset < 0 || uio->uio_offset + uio->uio_resid < 0) {
       hammer_done_transaction(&trans);
       return (EFBIG);
}

basically the second check was <= instead of < which caught my eye.
I could be wrong, because I haven't dug into the code, but that's the most obvious point in the return (EFBIG) case.
Try that, Antonio, and once youve got a built kernel, try copying a zero-byte file to a HAMMER fs.

Regards.
Jon
________________________________________
From: kernel-errors at crater.dragonflybsd.org [kernel-errors at crater.dragonflybsd.org] On Behalf Of Antonio Huete Jimenez [tuxillo at quantumachine.net]
Sent: Tuesday, June 10, 2008 4:45 AM
Subject: 0 bytes sized file can't be written to a HAMMER partition

Hi all,

master# mount | grep datapool
datapool on /datapool (hammer, local)

While doing a make installworld DESTDIR=/datapool/diskless/station01/
the process is stopped with this error:

===> games/phantasia
install -o root -g games -m 660  characs
/datapool/diskless/station01//var/games/phantasia
install: /datapool/diskless/station01//var/games/phantasia/characs: File
too large
*** Error code 71

This is quite strange since characs file is zero-bytes sized.

master# ls -l /usr/obj/usr/src/world_i386/usr/src/games/phantasia/characs
-rw-r--r--  1 root  wheel  0 Jun 10 14:40
/usr/obj/usr/src/world_i386/usr/src/games/phantasia/characs

make installword to a UFS partition didn't fail.

The only reference I've found to EFBIG in sys/vfs/hammer directory is:
hammer_vnops.c:294:             return (EFBIG);

/*
  * Check for illegal write offsets.  Valid range is 0...2^63-1
  */
if (uio->uio_offset < 0 || uio->uio_offset + uio->uio_resid <= 0) {
       hammer_done_transaction(&trans);
       return (EFBIG);
}

I'm sorry I don't have the knowledge to explain this.

Regards,
Antonio Huete





More information about the Kernel mailing list