[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111125232842.GB11661@quack.suse.cz>
Date: Sat, 26 Nov 2011 00:28:42 +0100
From: Jan Kara <jack@...e.cz>
To: Zheng Liu <gnehzuil.liu@...il.com>
Cc: linux-ext4@...r.kernel.org, Zheng Liu <wenqing.lz@...bao.com>
Subject: Re: [PATCH] ext4: replace ll_rw_block with other functions
On Fri 25-11-11 11:30:41, Zheng Liu wrote:
> Hi all,
>
> ll_rw_block() has deprecated since 1da177e4 and some filesystems, such as
> xfs and btrfs, also don't use it. So I propose that maybe we should
> replace it with other functions (e.g. submit_bh() or bh_submit_read()).
> Meanwhile, ext3 might need to replace it too. But I am not sure whether
> or not this proprosal is good. So any comments are appreciated. Thank
> you. If it is ok and good to ext3, I will generate a patch for it.
I'm not sure. ll_rw_block() is one of deprecated functions which noone
really tries to deprecate too hard. But using submit_bh() and friends for
consistency probably makes sense.
> From: Zheng Liu <wenqing.lz@...bao.com>
>
> ll_rw_block() has deprecated. Thus, we should replace it with other
> functions.
Let me improve English a bit:
ll_rw_block() is deprecated. Thus we replace it with other functions.
Besides that I have one comment below:
> Signed-off-by: Zheng Liu <wenqing.lz@...bao.com>
> ---
...
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 3858767..cbe1513 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4011,11 +4011,12 @@ static journal_t *ext4_get_dev_journal(struct super_block *sb,
> goto out_bdev;
> }
> journal->j_private = sb;
> - ll_rw_block(READ, 1, &journal->j_sb_buffer);
> - wait_on_buffer(journal->j_sb_buffer);
> - if (!buffer_uptodate(journal->j_sb_buffer)) {
> - ext4_msg(sb, KERN_ERR, "I/O error on journal device");
> - goto out_journal;
> + if (!bh_uptodate_or_lock(bh)) {
^^^ Here must be journal->j_sb_buffer
> + if (bh_submit_read(journal->j_sb_buffer)) {
> + ext4_msg(sb, KERN_ERR,
> + "I/O error on journal device");
> + goto out_journal;
> + }
> }
> if (be32_to_cpu(journal->j_superblock->s_nr_users) != 1) {
> ext4_msg(sb, KERN_ERR, "External journal has more than one "
> --
> 1.7.4.1
Honza
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists