From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 0/9] dquot interface cleanups v2
Date: Wed, 03 Mar 2010 18:36:58 +0300 [thread overview]
Message-ID: <87pr3lmn6t.fsf@openvz.org> (raw)
In-Reply-To: <20100303145627.GE6290@quack.suse.cz> (Jan Kara's message of "Wed, 3 Mar 2010 15:56:27 +0100")
[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]
Jan Kara <jack@suse.cz> writes:
> On Wed 03-03-10 17:52:00, Dmitry Monakhov wrote:
>> Christoph Hellwig <hch@infradead.org> writes:
>>
>> > Get rid of the dquot operations that were used for calls from the
>> > filesystems into the dquot code, clean up the namespace for calls
>> > to the dquot code to always be dquot_, and move the few calls into
>> > the dquot code that were in the VFS into the filesystems.
>> >
>> > This version dddresses various comments from Jan and adds a new patch
>> > to get rid of the QUOTA_OK / NO_QUOTA return values.
>> I'm not able to apply the patch set on top of linux-fs-2.6/for_next
>> and linux-fs-2.6/for_next w/o your previous patches
>> Which tree/commit this patch-set is aimed to?
> It replaces the old version of the series in my for_next branch...
> I'll take care of that.
Ok.
BTW: i've able to apply the patch-set, can you please fold tiny fix
below to appropriate patches. It's aimed to complete error code
handling convention. This allow us later to return other than
EDQUOT errors from quota code.
[-- Attachment #2: diff --]
[-- Type: application/octet-stream, Size: 1446 bytes --]
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3c74096..82b3353 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1839,7 +1839,7 @@ static int ext4_da_reserve_space(struct inode *inode, sector_t lblock)
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
struct ext4_inode_info *ei = EXT4_I(inode);
unsigned long md_needed, md_reserved;
-
+ int ret;
/*
* recalculate the amount of metadata blocks to reserve
* in order to allocate nrblocks
@@ -1856,8 +1856,9 @@ repeat:
* later. Real quota accounting is done at pages writeout
* time.
*/
- if (dquot_reserve_block(inode, md_needed + 1))
- return -EDQUOT;
+ ret = dquot_reserve_block(inode, md_needed + 1);
+ if (ret)
+ return ret;
if (ext4_claim_free_blocks(sbi, md_needed + 1)) {
dquot_release_reservation_block(inode, md_needed + 1);
diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c
index 6f9205d..e2ff180 100644
--- a/fs/udf/balloc.c
+++ b/fs/udf/balloc.c
@@ -801,12 +801,13 @@ static int udf_table_new_block(struct super_block *sb,
newblock = goal_eloc.logicalBlockNum;
goal_eloc.logicalBlockNum++;
goal_elen -= sb->s_blocksize;
-
- if (inode && dquot_alloc_block(inode, 1)) {
- brelse(goal_epos.bh);
- mutex_unlock(&sbi->s_alloc_mutex);
- *err = -EDQUOT;
- return 0;
+ if (inode) {
+ *err = dquot_alloc_block(inode, 1);
+ if (*err) {
+ brelse(goal_epos.bh);
+ mutex_unlock(&sbi->s_alloc_mutex);
+ return 0;
+ }
}
if (goal_elen)
next prev parent reply other threads:[~2010-03-03 15:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 14:04 [PATCH 0/9] dquot interface cleanups v2 Christoph Hellwig
2010-03-03 14:05 ` [PATCH 1/9] dquot: cleanup space allocation / freeing routines Christoph Hellwig
2010-03-03 14:05 ` [PATCH 2/9] dquot: cleanup inode " Christoph Hellwig
2010-03-03 14:05 ` [PATCH 3/9] dquot: move dquot transfer responsibiliy into the filesystem Christoph Hellwig
2010-03-03 14:05 ` [PATCH 4/9] dquot: cleanup dquot transfer routine Christoph Hellwig
2010-03-03 14:05 ` [PATCH 5/9] dquot: move dquot drop responsibiliy into the filesystem Christoph Hellwig
2010-03-03 14:05 ` [PATCH 6/9] dquot: cleanup dquot drop routine Christoph Hellwig
2010-03-03 14:05 ` [PATCH 7/9] dquot: move dquot initialization responsibiliy into the filesystem Christoph Hellwig
2010-03-03 14:05 ` [PATCH 8/9] dquot: cleanup dquot initialize routine Christoph Hellwig
2010-03-03 14:05 ` [PATCH 9/9] quota: stop using QUOTA_OK / NO_QUOTA Christoph Hellwig
2010-03-03 14:52 ` [PATCH 0/9] dquot interface cleanups v2 Dmitry Monakhov
2010-03-03 14:56 ` Jan Kara
2010-03-03 15:36 ` Dmitry Monakhov [this message]
2010-03-03 15:45 ` Jan Kara
2010-03-03 15:51 ` 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=87pr3lmn6t.fsf@openvz.org \
--to=dmonakhov@openvz.org \
--cc=hch@infradead.org \
--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 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).