All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/6] ocfs2: Make global quota files blocksize aligned
Date: Tue, 21 Jul 2009 14:54:24 -0700	[thread overview]
Message-ID: <20090721215424.GE19170@mail.oracle.com> (raw)
In-Reply-To: <1247673304-31080-2-git-send-email-jack@suse.cz>

On Wed, Jul 15, 2009 at 05:54:59PM +0200, Jan Kara wrote:
> Change i_size of global quota files so that it always remains aligned to block
> size. This is mainly because the end of quota block may contain checksum (if
> checksumming is enabled) and it's a bit awkward for it to be "outside" of quota
> file (and it makes life harder for ocfs2-tools).
> 
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
>  fs/ocfs2/quota_global.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
> index edfa60c..5a4ae61 100644
> --- a/fs/ocfs2/quota_global.c
> +++ b/fs/ocfs2/quota_global.c
> @@ -211,14 +211,16 @@ ssize_t ocfs2_quota_write(struct super_block *sb, int type,
>  
>  	mutex_lock_nested(&gqinode->i_mutex, I_MUTEX_QUOTA);
>  	if (gqinode->i_size < off + len) {
> +		loff_t rounded_end = ALIGN(off + len, sb->s_blocksize);

	We have ocfs2_align_bytes_to_blocks() for this.

Joel

-- 

"Conservative, n.  A statesman who is enamoured of existing evils,
 as distinguished from the Liberal, who wishes to replace them
 with others."
	- Ambrose Bierce, The Devil's Dictionary

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2009-07-21 21:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 15:54 [Ocfs2-devel] [PATCH 0/6] Quota fixes for 2.6.31-rc4 Jan Kara
2009-07-15 15:54 ` [Ocfs2-devel] [PATCH 1/6] ocfs2: Make global quota files blocksize aligned Jan Kara
2009-07-21 21:54   ` Joel Becker [this message]
2009-07-15 15:55 ` [Ocfs2-devel] [PATCH 2/6] ocfs2: Mark buffer uptodate before calling ocfs2_journal_access_dq() Jan Kara
2009-07-15 15:55 ` [Ocfs2-devel] [PATCH 3/6] ocfs2: Initialize blocks allocated to local quota file Jan Kara
2009-07-21 22:20   ` Joel Becker
2009-07-21 22:52     ` Jan Kara
2009-07-15 15:55 ` [Ocfs2-devel] [PATCH 4/6] ocfs2: Zero out padding of on disk dquot structure Jan Kara
2009-07-15 15:55 ` [Ocfs2-devel] [PATCH 5/6] ocfs2: Fix initialization of blockcheck stats Jan Kara
2009-07-15 15:55 ` [Ocfs2-devel] [PATCH 6/6] ocfs2: Remove syncjiff field from quota info Jan Kara
2009-07-21 22:24   ` Joel Becker
2009-07-21 22:55     ` Jan Kara

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=20090721215424.GE19170@mail.oracle.com \
    --to=joel.becker@oracle.com \
    --cc=ocfs2-devel@oss.oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.