Messages in this thread |  | | From | Russell King <> | Subject | 2.4.0-test10-pre3:mkdir() returns -EIO when ext2 filesystem full | Date | Sat, 21 Oct 2000 14:14:21 +0100 (BST) |
| |
Hi,
Something weird is going on with VFS return codes with kernel 2.4.0-test10-pre3:
[root@sturm glibc-2.1.92]# df /var/tmp Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda3 127383 127383 0 100% /var [root@sturm glibc-2.1.92]# df -i /var/tmp Filesystem Inodes IUsed IFree IUse% Mounted on /dev/hda3 32912 2936 29976 9% /var [root@sturm glibc-2.1.92]# mkdir /var/tmp/tst mkdir: cannot create directory `/var/tmp/tst': Input/output error [root@sturm glibc-2.1.92]#
Just a guess, but I think this is caused by:
dir_block = ext2_bread (inode, 0, 1, &err); if (!dir_block) { inode->i_nlink--; /* is this nlink == 0? */ mark_inode_dirty(inode); iput (inode); return -EIO; }
in fs/ext2/namei.c:ext2_mkdir(). Note that I can't find any cases where ext2_alloc_block() would actually give a ENOSPC return.
Note (again) the dodgy return error by reference, and then we totally ignore 'err', so even if ext2_alloc_block() was fixed, it wouldn't matter unless this and probably other places were also fixed to return err instead of EIO. _____ |_____| ------------------------------------------------- ---+---+- | | Russell King rmk@arm.linux.org.uk --- --- | | | | http://www.arm.linux.org.uk/personal/aboutme.html / / | | +-+-+ --- -+- / | THE developer of ARM Linux |+| /|\ / | | | --- | +-+-+ ------------------------------------------------- /\\\ | - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |