From: Tejun Heo <tj@kernel.org>
To: Grant Grundler <grundler@google.com>
Cc: bzolnier@gmail.com, linux-kernel@vger.kernel.org,
axboe@kernel.dk, linux-ide@vger.kernel.org
Subject: Re: [PATCH 02/10] ide-tape: use single continuous buffer
Date: Thu, 26 Mar 2009 01:13:31 +0900 [thread overview]
Message-ID: <49CA582B.9080706@kernel.org> (raw)
In-Reply-To: <da824cf30903250904n211b157eje2db99b0bdb1f33a@mail.gmail.com>
Hello, Grant.
Grant Grundler wrote:
> On Wed, Mar 25, 2009 at 7:17 AM, Tejun Heo <tj@kernel.org> wrote:
>> Impact: simpler buffer allocation and handling, fix DMA transfers
> ...
>> + atomic_set(&bh->b_count, bcount);
>> if (atomic_read(&bh->b_count) == bh->b_size)
> ...
>
> I'm failing to see why bh->b_count is an atomic_t.
> I always assumed tapes were exclusive access devices
> and would be serialized at a higher level.
Beats me. I don't know. The code is generally pretty over-engineered
but, well, it's an ancient piece of code with (probably too) rich
history.
>> - ide_tape_kfree_buffer(tape);
>> - return NULL;
>> + bh->b_size = tape->buffer_size;
>> + atomic_set(&bh->b_count, full ? bh->b_size : 0);
>
> No one else could possibly be referencing bh->count at this
> point...I like that it's consistent though.
Yeah, this patch is just one of logical steps to remove bh, so it
doesn't make any other changes than described. The whole bh stuff
will be removed later in the series.
> The use of atomic won't hurt correctness and this patch looks fine to me.
> Please add "Reviewed-by: Grant Grundler <grundler@google.com>"
Thanks.
--
tejun
next prev parent reply other threads:[~2009-03-25 16:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-25 14:17 [RFC PATCHSET pata-2.6] ide: clean up ide-tape Tejun Heo
2009-03-25 14:17 ` [PATCH 01/10] ide-atapi: allow ->pc_callback() to change rq->data_len Tejun Heo
2009-03-25 14:17 ` [PATCH 02/10] ide-tape: use single continuous buffer Tejun Heo
2009-03-25 16:04 ` Grant Grundler
2009-03-25 16:13 ` Tejun Heo [this message]
2009-03-25 16:38 ` Borislav Petkov
2009-03-25 14:17 ` [PATCH 03/10] ide-tape-convert-to-bio Tejun Heo
2009-03-25 14:24 ` [PATCH 03/10 REPOST] ide-tape: use bio to carry data area Tejun Heo
2009-03-25 14:17 ` [PATCH 04/10] ide-tape: use standard data transfer mechanism Tejun Heo
2009-03-25 15:12 ` Borislav Petkov
2009-03-25 15:20 ` Borislav Petkov
2009-03-25 14:17 ` [PATCH 05/10] ide-tape: kill idetape_bh Tejun Heo
2009-03-25 14:17 ` [PATCH 06/10] ide-tape: unify r/w init paths Tejun Heo
2009-03-25 14:17 ` [PATCH 07/10] ide-tape: use byte size instead of sectors on rw issue functions Tejun Heo
2009-03-25 14:17 ` [PATCH 08/10] ide-tape: simplify read/write functions Tejun Heo
2009-03-25 14:17 ` [PATCH 09/10] ide-atapi: kill unused fields and callbacks Tejun Heo
2009-03-25 14:17 ` [PATCH 10/10] ide: drop rq->data handling from ide_map_sg() Tejun Heo
2009-03-31 7:48 ` [RFC PATCHSET pata-2.6] ide: clean up ide-tape Borislav Petkov
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=49CA582B.9080706@kernel.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=bzolnier@gmail.com \
--cc=grundler@google.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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).