Messages in this thread Patch in this message | | | Date | Sat, 4 Feb 2006 04:18:15 +0300 | From | Alexey Dobriyan <> | Subject | [PATCH] ufs: fill i_size at directory creation |
| |
On Fri, Feb 03, 2006 at 08:46:13PM +0300, Alexey Dobriyan wrote: > Thanks, these two patches makes things better but not much better. > > 1. > > inode->i_blocks = sb->s_blocksize / UFS_SECTOR_SIZE; > + inode->i_size = sb->s_blocksize; > de = (struct ufs_dir_entry *) dir_block->b_data; > > This creates directories which are 2048 bytes in size. Native ones are > 512 bytes. > > inode->i_size = 512; > > makes mkdir and rm reliable for me both on linux and OpenBSD.
I take "reliably" back.
for i in $(seq 1 100); do mkdir $i; done
barfs after 42-nd.
How about this as a first small step?
[PATCH] ufs: fill i_size at directory creation
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
--- a/fs/ufs/dir.c +++ b/fs/ufs/dir.c @@ -539,6 +539,7 @@ int ufs_make_empty(struct inode * inode, return err; inode->i_blocks = sb->s_blocksize / UFS_SECTOR_SIZE; + inode->i_size = UFS_SB(sb)->s_uspi->s_fsize; de = (struct ufs_dir_entry *) dir_block->b_data; de->d_ino = cpu_to_fs32(sb, inode->i_ino); ufs_set_de_type(sb, de, inode->i_mode); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |