linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [JANITOR PROPOSAL] Switch ioctl functions to ->unlocked_ioctl
       [not found] <20080108164015.GC31504@one.firstfloor.org>
@ 2008-01-08 23:50 ` Kevin Winchester
  2008-01-09  0:09   ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Winchester @ 2008-01-08 23:50 UTC (permalink / raw)
  To: Andi Kleen
  Cc: linux-kernel, kernel-janitors, paolo.ciarrocchi, gorcunov,
	jgarzik, linux-ide

Andi Kleen wrote:
> Here's a proposal for some useful code transformations the kernel janitors
> could do as opposed to running checkpatch.pl.
> 
<snip>

I notice that every driver in drivers/ata uses a .ioctl that points to
ata_scsi_ioctl().  I could add the BKL to that function, and then change
all of the drivers to .unlocked_ioctl, but I assume this would be a
candidate to actually clean up by determining why the lock is needed and
removing it if necessary.  Does anyone know off-hand the reason for
needing the lock (I assume someone does or it wouldn't have survived
this long)?  If the lock is absolutely required, then I can write the
patch to add lock_kernel() and unlock_kernel().

-- 
Kevin Winchester


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [JANITOR PROPOSAL] Switch ioctl functions to ->unlocked_ioctl
  2008-01-08 23:50 ` [JANITOR PROPOSAL] Switch ioctl functions to ->unlocked_ioctl Kevin Winchester
@ 2008-01-09  0:09   ` Andi Kleen
  2008-01-09  0:17     ` Kevin Winchester
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2008-01-09  0:09 UTC (permalink / raw)
  To: Kevin Winchester
  Cc: Andi Kleen, linux-kernel, kernel-janitors, paolo.ciarrocchi,
	gorcunov, jgarzik, linux-ide

On Tue, Jan 08, 2008 at 07:50:47PM -0400, Kevin Winchester wrote:
> Andi Kleen wrote:
> > Here's a proposal for some useful code transformations the kernel janitors
> > could do as opposed to running checkpatch.pl.
> > 
> <snip>
> 
> I notice that every driver in drivers/ata uses a .ioctl that points to
> ata_scsi_ioctl().  I could add the BKL to that function, and then change

This might be a little more complicated. These
are funnelled through the block/SCSI layers which might not have separate
unlocked ioctl callbacks yet. Would be probably not very difficult
to add though.

> all of the drivers to .unlocked_ioctl, but I assume this would be a
> candidate to actually clean up by determining why the lock is needed and
> removing it if necessary.  Does anyone know off-hand the reason for
> needing the lock (I assume someone does or it wouldn't have survived
> this long)?  If the lock is absolutely required, then I can write the
> patch to add lock_kernel() and unlock_kernel().

Just sending the patch to add lock/unlock_kernel() is probably a good idea anyways --
Jeff will then feel bad over it and eventually remove it when he figures out
it is safe ;-)

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [JANITOR PROPOSAL] Switch ioctl functions to ->unlocked_ioctl
  2008-01-09  0:09   ` Andi Kleen
@ 2008-01-09  0:17     ` Kevin Winchester
  2008-01-09  0:27       ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Winchester @ 2008-01-09  0:17 UTC (permalink / raw)
  To: Andi Kleen
  Cc: linux-kernel, kernel-janitors, paolo.ciarrocchi, gorcunov,
	jgarzik, linux-ide

Andi Kleen wrote:
> On Tue, Jan 08, 2008 at 07:50:47PM -0400, Kevin Winchester wrote:
>> Andi Kleen wrote:
>>> Here's a proposal for some useful code transformations the kernel janitors
>>> could do as opposed to running checkpatch.pl.
>>>
>> <snip>
>>
>> I notice that every driver in drivers/ata uses a .ioctl that points to
>> ata_scsi_ioctl().  I could add the BKL to that function, and then change
> 
> This might be a little more complicated. These
> are funnelled through the block/SCSI layers which might not have separate
> unlocked ioctl callbacks yet. Would be probably not very difficult
> to add though.
> 
>> all of the drivers to .unlocked_ioctl, but I assume this would be a
>> candidate to actually clean up by determining why the lock is needed and
>> removing it if necessary.  Does anyone know off-hand the reason for
>> needing the lock (I assume someone does or it wouldn't have survived
>> this long)?  If the lock is absolutely required, then I can write the
>> patch to add lock_kernel() and unlock_kernel().
> 
> Just sending the patch to add lock/unlock_kernel() is probably a good idea anyways --
> Jeff will then feel bad over it and eventually remove it when he figures out
> it is safe ;-)
> 

Sorry about the noise here - I now notice that not all .ioctl function
pointers have the option of changing to .unlocked_ioctl.  In this case,
the ioctl is in the struct scsi_host_template, rather than struct
file_operations.

I'll try to be a little more careful about the git grepping in the future.

-- 
Kevin Winchester

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [JANITOR PROPOSAL] Switch ioctl functions to ->unlocked_ioctl
  2008-01-09  0:17     ` Kevin Winchester
@ 2008-01-09  0:27       ` Andi Kleen
  0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2008-01-09  0:27 UTC (permalink / raw)
  To: Kevin Winchester
  Cc: Andi Kleen, linux-kernel, kernel-janitors, paolo.ciarrocchi,
	gorcunov, jgarzik, linux-ide

> Sorry about the noise here - I now notice that not all .ioctl function
> pointers have the option of changing to .unlocked_ioctl.  In this case,
> the ioctl is in the struct scsi_host_template, rather than struct
> file_operations.
> 
> I'll try to be a little more careful about the git grepping in the future.

Well it just points to another area that needs to be improved. Clearly
scsi_host_template should have a unlocked_ioctl too.

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-09  0:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080108164015.GC31504@one.firstfloor.org>
2008-01-08 23:50 ` [JANITOR PROPOSAL] Switch ioctl functions to ->unlocked_ioctl Kevin Winchester
2008-01-09  0:09   ` Andi Kleen
2008-01-09  0:17     ` Kevin Winchester
2008-01-09  0:27       ` Andi Kleen

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).