From: Namjae Jeon <linkinjeon@gmail.com>
To: jack@suse.cz
Cc: linux-kernel@vger.kernel.org, Namjae Jeon <linkinjeon@gmail.com>,
Namjae Jeon <namjae.jeon@samsung.com>,
Ashish Sangwan <a.sangwan@samsung.com>
Subject: [PATCH 3/6] udf: update inode's iblock count when allocating new block
Date: Wed, 10 Oct 2012 00:09:28 +0900 [thread overview]
Message-ID: <1349795368-6425-1-git-send-email-linkinjeon@gmail.com> (raw)
From: Namjae Jeon <namjae.jeon@samsung.com>
Currently, du will show wrong block count. This patch fix it.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
---
fs/udf/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 8266f2e..76a1f57 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -775,6 +775,8 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
if (isBeyondEOF)
iinfo->i_lenExtents += inode->i_sb->s_blocksize;
}
+ /* update inode's iblocks */
+ inode->i_blocks += (1 << (inode->i_sb->s_blocksize_bits - 9));
/* if the extent the requsted block is located in contains multiple
* blocks, split the extent into at most three extents. blocks prior
--
1.7.9.5
next reply other threads:[~2012-10-09 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 15:09 Namjae Jeon [this message]
2012-10-11 17:54 ` Jan Kara
2012-10-12 12:59 ` Namjae Jeon
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=1349795368-6425-1-git-send-email-linkinjeon@gmail.com \
--to=linkinjeon@gmail.com \
--cc=a.sangwan@samsung.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
/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
all inboxes | Powered by JetHome®