From: Mingming Cao <cmm@us.ibm.com>
To: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org,
Andrew Perepechko <andrew.perepechko@sun.com>
Subject: Re: [PATCH 14/14] quota: Support 64-bit quota format
Date: Tue, 28 Oct 2008 17:41:51 -0700 [thread overview]
Message-ID: <1225240911.6452.5.camel@mingming-laptop> (raw)
In-Reply-To: <1225109513200-git-send-email-jack@suse.cz>
在 2008-10-27一的 13:11 +0100,Jan Kara写道:
> Implement conversion functions for new version (version 1) of quota
> format which supports 64-bit block and inode limits and 64-bit inode
> usage. The original implementation has been written by Andrew Perepechko.
>
> Signed-off-by: Andrew Perepechko <andrew.perepechko@sun.com>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> fs/quota_v2.c | 140 ++++++++++++++++++++++++++++++++++++++++++++-----------
> fs/quotaio_v2.h | 26 ++++++++--
> 2 files changed, 132 insertions(+), 34 deletions(-)
>
> diff --git a/fs/quota_v2.c b/fs/quota_v2.c
> index a371919..ac6668d 100644
> --- a/fs/quota_v2.c
> +++ b/fs/quota_v2.c
...
> @@ -73,7 +90,13 @@ static int v2_read_file_info(struct super_block *sb, int type)
> struct mem_dqinfo *info = sb_dqinfo(sb, type);
> struct qtree_mem_dqinfo *qinfo;
> ssize_t size;
> + int version = v2_check_quota_file_header(sb, type);
>
> + if (version < 0) {
> + printk(KERN_WARNING "Cannot identify quota file version on "
> + "device %s: %d\n", sb->s_id, version);
> + return -1;
> + }
> size = sb->s_op->quota_read(sb, type, (char *)&dinfo,
> sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
> if (size != sizeof(struct v2_disk_dqinfo)) {
> @@ -88,9 +111,14 @@ static int v2_read_file_info(struct super_block *sb, int type)
> return -1;
> }
> qinfo = info->dqi_priv;
> - /* limits are stored as unsigned 32-bit data */
> - info->dqi_maxblimit = 0xffffffff;
> - info->dqi_maxilimit = 0xffffffff;
> + if (version == 0) {
> + /* limits are stored as unsigned 32-bit data */
> + info->dqi_maxblimit = 0xffffffff;
> + info->dqi_maxilimit = 0xffffffff;
> + } else {
> + info->dqi_maxblimit = 0x7fffffffffffffff;
> + info->dqi_maxilimit = 0x7fffffffffffffff;
> + }
I got some compile warning saying
fs/quota_v2.c: In function ‘v2_read_file_info’:
fs/quota_v2.c:119: warning: integer constant is too large for ‘long’ type
fs/quota_v2.c:120: warning: integer constant is too large for ‘long’ type
qsize_t is defined as __u64, however...
Mingming
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-10-29 0:41 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 12:11 [PATCH 00/14] 64-bit quotas and preparations for OCFS2 quotas Jan Kara
2008-10-27 12:11 ` [PATCH 01/14] quota: Add callbacks for allocating and destroying dquot structures Jan Kara
2008-10-27 12:11 ` [PATCH 02/14] quota: Increase size of variables for limits and inode usage Jan Kara
2008-10-27 12:11 ` [PATCH 03/14] quota: Remove bogus 'optimization' in check_idq() and check_bdq() Jan Kara
2008-10-27 12:11 ` [PATCH 04/14] quota: Make _SUSPENDED just a flag Jan Kara
2008-10-27 12:11 ` [PATCH 05/14] quota: Allow to separately enable quota accounting and enforcing limits Jan Kara
2008-10-27 12:11 ` [PATCH 06/14] ext3: Use sb_any_quota_loaded() instead of sb_any_quota_enabled() Jan Kara
2008-10-27 12:11 ` [PATCH 07/14] ext4: " Jan Kara
2008-10-27 12:11 ` [PATCH 08/14] reiserfs: " Jan Kara
2008-10-27 12:11 ` [PATCH 09/14] quota: Remove compatibility function sb_any_quota_enabled() Jan Kara
2008-10-27 12:11 ` [PATCH 10/14] quota: Introduce DQUOT_QUOTA_SYS_FILE flag Jan Kara
2008-10-27 12:11 ` [PATCH 11/14] quota: Move quotaio_v[12].h from include/linux/ to fs/ Jan Kara
2008-10-27 12:11 ` [PATCH 12/14] quota: Split off quota tree handling into a separate file Jan Kara
2008-10-27 12:11 ` [PATCH 13/14] quota: Convert union in mem_dqinfo to a pointer Jan Kara
2008-10-27 12:11 ` [PATCH 14/14] quota: Support 64-bit quota format Jan Kara
2008-10-28 5:29 ` Andrew Morton
2008-10-29 2:39 ` Jan Kara
2008-10-29 0:41 ` Mingming Cao [this message]
2008-10-29 1:02 ` Andrew Morton
2008-10-29 21:31 ` Mingming Cao
2008-10-28 5:55 ` [PATCH 13/14] quota: Convert union in mem_dqinfo to a pointer Andrew Morton
2008-10-29 2:40 ` Jan Kara
2008-10-28 5:52 ` [PATCH 12/14] quota: Split off quota tree handling into a separate file Andrew Morton
2008-10-29 2:43 ` Jan Kara
2008-10-28 22:32 ` [PATCH 11/14] quota: Move quotaio_v[12].h from include/linux/ to fs/ Andrew Morton
2008-10-29 3:21 ` Jan Kara
2008-10-28 5:44 ` [PATCH 10/14] quota: Introduce DQUOT_QUOTA_SYS_FILE flag Andrew Morton
2008-10-28 17:51 ` Joel Becker
2008-10-28 5:40 ` [PATCH 02/14] quota: Increase size of variables for limits and inode usage Andrew Morton
2008-10-28 9:11 ` Boaz Harrosh
2008-10-29 3:01 ` Jan Kara
2008-10-28 5:33 ` [PATCH 01/14] quota: Add callbacks for allocating and destroying dquot structures Andrew Morton
2008-10-29 3:05 ` 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=1225240911.6452.5.camel@mingming-laptop \
--to=cmm@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andrew.perepechko@sun.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@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 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.