From: Alexey Dobriyan <adobriyan@gmail.com>
To: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH] ufs: fill i_size at directory creation
Date: Sat, 4 Feb 2006 04:18:15 +0300 [thread overview]
Message-ID: <20060204011815.GA7837@mipter.zuzino.mipt.ru> (raw)
In-Reply-To: <20060203174613.GA7823@mipter.zuzino.mipt.ru>
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);
next prev parent reply other threads:[~2006-02-04 1:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-31 23:46 [PATCH] Mark CONFIG_UFS_FS_WRITE as BROKEN Alexey Dobriyan
2006-02-01 15:40 ` Evgeniy Dushistov
2006-02-01 20:04 ` Re [2]: " Evgeniy Dushistov
2006-02-02 23:40 ` Andrew Morton
2006-02-03 17:46 ` Alexey Dobriyan
2006-02-03 22:44 ` Alexey Dobriyan
2006-02-04 1:18 ` Alexey Dobriyan [this message]
2006-02-04 6:18 ` [PATCH] ufs: fill i_size at directory creation Evgeniy Dushistov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060204011815.GA7837@mipter.zuzino.mipt.ru \
--to=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=dushistov@mail.ru \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).