From: Fabio Comolli <fabio.comolli@gmail.com>
To: Theodore Tso <tytso@mit.edu>,
Fabio Comolli <fabio.comolli@gmail.com>,
Chuck Ebbert <cebbert@redhat.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
linux-ext4@vger.kernel
Subject: Re: Ext4 tree backports for 2.6.27.13 and 2.6.28.2
Date: Tue, 31 Mar 2009 14:40:22 +0200 [thread overview]
Message-ID: <b637ec0b0903310540s10ddfdb3vcf8e419ebffa09f9@mail.gmail.com> (raw)
In-Reply-To: <20090331123320.GC13356@mit.edu>
OK. Now I have on my box the 2.6.27.19 kernel. Do you mean that I have
to apply 19->20, 20->21 and then this patch?
Then mount the fs as ext4dev?
Thanks,
Fabio
On Tue, Mar 31, 2009 at 2:33 PM, Theodore Tso <tytso@mit.edu> wrote:
> On Tue, Mar 31, 2009 at 02:02:26PM +0200, Fabio Comolli wrote:
>> Is there a patch for 2.6.27.X for people not using git?
>
> These patches that were referenced in the mail thread which you
> replied against have already been integrated into the latest 2.6.27.X
> series.
>
> There is another batch of patches which is being queued for the stable
> series, which I sent out last week. The for-stable branch and
> for-stable-2.6.27 branches are for people to do a final round of
> testing before I submit them to the stable series. At the moment,
> they are only available via git, but usually after a week or so, I'll
> send them out to stable@kernel.org, and then usually within a week or
> so (unless Greg and Chris are travelling), a new stable series shows
> up with the latest ext4 bug fixes.
>
> If you really are interested in testing the latest pre-release stable
> patches for 2.6.27 --- these are versus 2.6.27.20, they're small
> enough that I'll include them here.
>
> - Ted
>
> Eric Sandeen (4):
> ext4: fix ext4_free_inode() vs. ext4_claim_inode() race
> ext4: fix header check in ext4_ext_search_right() for deep extent trees.
> ext4: fix bogus BUG_ONs in in mballoc code
> ext4: fix bb_prealloc_list corruption due to wrong group locking
>
> Theodore Ts'o (1):
> ext4: Print the find_group_flex() warning only once
>
> fs/ext4/extents.c | 6 ++++--
> fs/ext4/ialloc.c | 16 ++++++++++------
> fs/ext4/mballoc.c | 13 +++++++++----
> 3 files changed, 23 insertions(+), 12 deletions(-)
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index b24d3c5..acb98c9 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -1118,7 +1118,8 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
> struct ext4_extent_idx *ix;
> struct ext4_extent *ex;
> ext4_fsblk_t block;
> - int depth, ee_len;
> + int depth; /* Note, NOT eh_depth; depth from top of tree */
> + int ee_len;
>
> BUG_ON(path == NULL);
> depth = path->p_depth;
> @@ -1177,7 +1178,8 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
> if (bh == NULL)
> return -EIO;
> eh = ext_block_hdr(bh);
> - if (ext4_ext_check_header(inode, eh, depth)) {
> + /* subtract from p_depth to get proper eh_depth */
> + if (ext4_ext_check_header(inode, eh, path->p_depth - depth)) {
> put_bh(bh);
> return -EIO;
> }
> diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
> index cce841f..b9457e1 100644
> --- a/fs/ext4/ialloc.c
> +++ b/fs/ext4/ialloc.c
> @@ -188,7 +188,7 @@ void ext4_free_inode (handle_t *handle, struct inode * inode)
> struct ext4_group_desc * gdp;
> struct ext4_super_block * es;
> struct ext4_sb_info *sbi;
> - int fatal = 0, err;
> + int fatal = 0, err, cleared;
> ext4_group_t flex_group;
>
> if (atomic_read(&inode->i_count) > 1) {
> @@ -242,10 +242,12 @@ void ext4_free_inode (handle_t *handle, struct inode * inode)
> goto error_return;
>
> /* Ok, now we can actually update the inode bitmaps.. */
> - if (!ext4_clear_bit_atomic(sb_bgl_lock(sbi, block_group),
> - bit, bitmap_bh->b_data))
> - ext4_error (sb, "ext4_free_inode",
> - "bit already cleared for inode %lu", ino);
> + spin_lock(sb_bgl_lock(sbi, block_group));
> + cleared = ext4_clear_bit(bit, bitmap_bh->b_data);
> + spin_unlock(sb_bgl_lock(sbi, block_group));
> + if (!cleared)
> + ext4_error(sb, "ext4_free_inode",
> + "bit already cleared for inode %lu", ino);
> else {
> gdp = ext4_get_group_desc (sb, block_group, &bh2);
>
> @@ -685,6 +687,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode)
> struct inode *ret;
> ext4_group_t i;
> int free = 0;
> + static int once = 1;
> ext4_group_t flex_group;
>
> /* Cannot create files in a deleted directory */
> @@ -704,7 +707,8 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode)
> ret2 = find_group_flex(sb, dir, &group);
> if (ret2 == -1) {
> ret2 = find_group_other(sb, dir, &group);
> - if (ret2 == 0 && printk_ratelimit())
> + if (ret2 == 0 && once)
> + once = 0;
> printk(KERN_NOTICE "ext4: find_group_flex "
> "failed, fallback succeeded dir %lu\n",
> dir->i_ino);
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 39d7cc1..f34dada 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -1450,7 +1450,7 @@ static void ext4_mb_measure_extent(struct ext4_allocation_context *ac,
> struct ext4_free_extent *gex = &ac->ac_g_ex;
>
> BUG_ON(ex->fe_len <= 0);
> - BUG_ON(ex->fe_len >= EXT4_BLOCKS_PER_GROUP(ac->ac_sb));
> + BUG_ON(ex->fe_len > EXT4_BLOCKS_PER_GROUP(ac->ac_sb));
> BUG_ON(ex->fe_start >= EXT4_BLOCKS_PER_GROUP(ac->ac_sb));
> BUG_ON(ac->ac_status != AC_STATUS_CONTINUE);
>
> @@ -3400,7 +3400,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
> }
> BUG_ON(start + size <= ac->ac_o_ex.fe_logical &&
> start > ac->ac_o_ex.fe_logical);
> - BUG_ON(size <= 0 || size >= EXT4_BLOCKS_PER_GROUP(ac->ac_sb));
> + BUG_ON(size <= 0 || size > EXT4_BLOCKS_PER_GROUP(ac->ac_sb));
>
> /* now prepare goal request */
>
> @@ -3698,6 +3698,7 @@ static void ext4_mb_put_pa(struct ext4_allocation_context *ac,
> struct super_block *sb, struct ext4_prealloc_space *pa)
> {
> unsigned long grp;
> + ext4_fsblk_t grp_blk;
>
> if (!atomic_dec_and_test(&pa->pa_count) || pa->pa_free != 0)
> return;
> @@ -3712,8 +3713,12 @@ static void ext4_mb_put_pa(struct ext4_allocation_context *ac,
> pa->pa_deleted = 1;
> spin_unlock(&pa->pa_lock);
>
> - /* -1 is to protect from crossing allocation group */
> - ext4_get_group_no_and_offset(sb, pa->pa_pstart - 1, &grp, NULL);
> + grp_blk = pa->pa_pstart;
> + /* If linear, pa_pstart may be in the next group when pa is used up */
> + if (pa->pa_linear)
> + grp_blk--;
> +
> + ext4_get_group_no_and_offset(sb, grp_blk, &grp, NULL);
>
> /*
> * possible race:
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" 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:[~2009-03-31 12:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-31 5:25 Ext4 tree backports for 2.6.27.13 and 2.6.28.2 Theodore Ts'o
2009-02-10 23:36 ` Chuck Ebbert
2009-02-11 20:37 ` Chuck Ebbert
2009-02-11 7:59 ` Aneesh Kumar K.V
2009-02-11 20:33 ` Chuck Ebbert
2009-02-12 21:19 ` Theodore Tso
2009-02-16 21:35 ` Chuck Ebbert
2009-03-31 12:02 ` Fabio Comolli
2009-03-31 12:33 ` Theodore Tso
2009-03-31 12:40 ` Fabio Comolli [this message]
2009-03-31 12:47 ` Theodore Tso
2009-03-31 12:50 ` Fabio Comolli
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=b637ec0b0903310540s10ddfdb3vcf8e419ebffa09f9@mail.gmail.com \
--to=fabio.comolli@gmail.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=cebbert@redhat.com \
--cc=linux-ext4@vger.kernel \
--cc=tytso@mit.edu \
/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).