[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ea470500903250938t35cbc403l2d0bb3ea5f1f1def@mail.gmail.com>
Date: Wed, 25 Mar 2009 17:38:32 +0100
From: Borislav Petkov <petkovbb@...glemail.com>
To: Tejun Heo <tj@...nel.org>
Cc: Grant Grundler <grundler@...gle.com>, bzolnier@...il.com,
linux-kernel@...r.kernel.org, axboe@...nel.dk,
linux-ide@...r.kernel.org
Subject: Re: [PATCH 02/10] ide-tape: use single continuous buffer
Hi,
On Wed, Mar 25, 2009 at 5:13 PM, Tejun Heo <tj@...nel.org> wrote:
> Hello, Grant.
>
> Grant Grundler wrote:
>> On Wed, Mar 25, 2009 at 7:17 AM, Tejun Heo <tj@...nel.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.
Yep, actually the driver was even bigger and it implemented a bunch of fun stuff
like command pipelining and those atomics had to protect the pipeline from
simultaneous ->open()s through its chrdev interface, IIRC.
--
Regards/Gruss,
Boris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists