Re: [PATCH] block: bsg.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-29 Thread Rickard Strandqvist
2014-07-28 16:31 GMT+02:00 Jeff Moyer : > Rickard Strandqvist writes: > >> Replacing strncpy with strlcpy to avoid strings that lacks null terminate. >> >> Signed-off-by: Rickard Strandqvist >> --- >> block/bsg.c |2 +- >> 1 file changed, 1 in

Re: [PATCH] block: bsg.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-29 Thread Rickard Strandqvist
2014-07-28 16:31 GMT+02:00 Jeff Moyer jmo...@redhat.com: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se writes: Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- block/bsg.c

Re: [PATCH] block: bsg.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-28 Thread Jeff Moyer
Rickard Strandqvist writes: > Replacing strncpy with strlcpy to avoid strings that lacks null terminate. > > Signed-off-by: Rickard Strandqvist > --- > block/bsg.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/bsg.c b/block/bsg.c

Re: [PATCH] block: bsg.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-28 Thread Jeff Moyer
Rickard Strandqvist rickard_strandqv...@spectrumdigital.se writes: Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- block/bsg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] block: bsg.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist --- block/bsg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bsg.c b/block/bsg.c index ff46add..b2688c5 100644 --- a/block/bsg.c +++ b/block/bsg.c

[PATCH] block: bsg.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- block/bsg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bsg.c b/block/bsg.c index ff46add..b2688c5 100644

Re: block/bsg.c

2007-07-18 Thread FUJITA Tomonori
From: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Wed, 18 Jul 2007 22:39:38 +0200 > > On Wednesday 18 July 2007, FUJITA Tomonori wrote: > > > They were fixed. Please check the latest code: > > > > git://git.kernel.org/pub/scm

Re: block/bsg.c

2007-07-18 Thread FUJITA Tomonori
From: James Bottomley <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Wed, 18 Jul 2007 09:23:44 -0500 > On Wed, 2007-07-18 at 08:54 -0500, James Bottomley wrote: > > You're welcome ... although there's still a problem for modular builds. > > This is what my /sys

Re: block/bsg.c

2007-07-18 Thread James Bottomley
On Wed, 2007-07-18 at 22:32 +0200, Bartlomiej Zolnierkiewicz wrote: > Hi, > > On Wednesday 18 July 2007, James Bottomley wrote: > > On Wed, 2007-07-18 at 02:43 +0200, Bartlomiej Zolnierkiewicz wrote: > > > [ James, please remeber to cc: linux-ide on IDE patches, thanks. ] > > > > Blame Andrew

Re: block/bsg.c

2007-07-18 Thread Bartlomiej Zolnierkiewicz
On Wednesday 18 July 2007, FUJITA Tomonori wrote: > They were fixed. Please check the latest code: > > git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git bsg > > We wait for Linus to pull from it. It has been merged. Thanks for fixing the mentioned issues. Thanks, Bart

Re: block/bsg.c

2007-07-18 Thread Bartlomiej Zolnierkiewicz
Hi, On Wednesday 18 July 2007, James Bottomley wrote: > On Wed, 2007-07-18 at 02:43 +0200, Bartlomiej Zolnierkiewicz wrote: > > [ James, please remeber to cc: linux-ide on IDE patches, thanks. ] > > Blame Andrew ... I assumed he'd be reporting the problem to the relevant > lists, so I just did

Re: block/bsg.c

2007-07-18 Thread James Bottomley
On Wed, 2007-07-18 at 08:54 -0500, James Bottomley wrote: > You're welcome ... although there's still a problem for modular builds. > This is what my /sys/class/bsg looks like: Sorry, lets see if I can get the paste to work this time: [EMAIL PROTECTED]> ls /sys/class/bsg/ 0:0:1:0/ sdb/ > So

Re: block/bsg.c

2007-07-18 Thread James Bottomley
On Wed, 2007-07-18 at 02:43 +0200, Bartlomiej Zolnierkiewicz wrote: > [ James, please remeber to cc: linux-ide on IDE patches, thanks. ] Blame Andrew ... I assumed he'd be reporting the problem to the relevant lists, so I just did a reply all ... > On Wednesday 18 July 2007, Jeff Garzik wrote: >

Re: block/bsg.c

2007-07-18 Thread James Bottomley
On Wed, 2007-07-18 at 09:20 +0900, FUJITA Tomonori wrote: > From: James Bottomley <[EMAIL PROTECTED]> > Subject: Re: block/bsg.c > Date: Tue, 17 Jul 2007 13:53:54 -0500 > > > On Tue, 2007-07-17 at 12:19 +0200, Jens Axboe wrote: > > > > > Since Linus is

Re: block/bsg.c

2007-07-18 Thread James Bottomley
On Wed, 2007-07-18 at 09:20 +0900, FUJITA Tomonori wrote: From: James Bottomley [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 13:53:54 -0500 On Tue, 2007-07-17 at 12:19 +0200, Jens Axboe wrote: Since Linus is happily snoring by now, could you test and see

Re: block/bsg.c

2007-07-18 Thread James Bottomley
On Wed, 2007-07-18 at 02:43 +0200, Bartlomiej Zolnierkiewicz wrote: [ James, please remeber to cc: linux-ide on IDE patches, thanks. ] Blame Andrew ... I assumed he'd be reporting the problem to the relevant lists, so I just did a reply all ... On Wednesday 18 July 2007, Jeff Garzik wrote:

Re: block/bsg.c

2007-07-18 Thread James Bottomley
On Wed, 2007-07-18 at 08:54 -0500, James Bottomley wrote: You're welcome ... although there's still a problem for modular builds. This is what my /sys/class/bsg looks like: Sorry, lets see if I can get the paste to work this time: [EMAIL PROTECTED] ls /sys/class/bsg/ 0:0:1:0/ sdb/ So you

Re: block/bsg.c

2007-07-18 Thread Bartlomiej Zolnierkiewicz
Hi, On Wednesday 18 July 2007, James Bottomley wrote: On Wed, 2007-07-18 at 02:43 +0200, Bartlomiej Zolnierkiewicz wrote: [ James, please remeber to cc: linux-ide on IDE patches, thanks. ] Blame Andrew ... I assumed he'd be reporting the problem to the relevant lists, so I just did a

Re: block/bsg.c

2007-07-18 Thread Bartlomiej Zolnierkiewicz
On Wednesday 18 July 2007, FUJITA Tomonori wrote: They were fixed. Please check the latest code: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git bsg We wait for Linus to pull from it. It has been merged. Thanks for fixing the mentioned issues. Thanks, Bart - To

Re: block/bsg.c

2007-07-18 Thread James Bottomley
On Wed, 2007-07-18 at 22:32 +0200, Bartlomiej Zolnierkiewicz wrote: Hi, On Wednesday 18 July 2007, James Bottomley wrote: On Wed, 2007-07-18 at 02:43 +0200, Bartlomiej Zolnierkiewicz wrote: [ James, please remeber to cc: linux-ide on IDE patches, thanks. ] Blame Andrew ... I assumed

Re: block/bsg.c

2007-07-18 Thread FUJITA Tomonori
From: James Bottomley [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Wed, 18 Jul 2007 09:23:44 -0500 On Wed, 2007-07-18 at 08:54 -0500, James Bottomley wrote: You're welcome ... although there's still a problem for modular builds. This is what my /sys/class/bsg looks like: Sorry, lets

Re: block/bsg.c

2007-07-18 Thread FUJITA Tomonori
From: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Wed, 18 Jul 2007 22:39:38 +0200 On Wednesday 18 July 2007, FUJITA Tomonori wrote: They were fixed. Please check the latest code: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git bsg

Re: block/bsg.c

2007-07-17 Thread Bartlomiej Zolnierkiewicz
[ James, please remeber to cc: linux-ide on IDE patches, thanks. ] On Wednesday 18 July 2007, Jeff Garzik wrote: > James Bottomley wrote: > > @@ -1052,9 +1054,10 @@ int generic_ide_ioctl(ide_drive_t *drive, struct > > file *file, struct block_device > > int err, (*setfunc)(ide_drive_t *,

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: James Bottomley <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 13:53:54 -0500 > On Tue, 2007-07-17 at 12:19 +0200, Jens Axboe wrote: > > > > Since Linus is happily snoring by now, could you test and see if the > > > > tree works for

Re: block/bsg.c

2007-07-17 Thread Jeff Garzik
James Bottomley wrote: @@ -1052,9 +1054,10 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device int err, (*setfunc)(ide_drive_t *, int); u8 *val; - err = scsi_cmd_ioctl(file, bdev->bd_disk->queue, bdev->bd_disk, cmd, p); - if (err !=

Re: block/bsg.c

2007-07-17 Thread Bartlomiej Zolnierkiewicz
On Tuesday 17 July 2007, Andrew Morton wrote: > On Tue, 17 Jul 2007 22:52:25 +0200 > Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> wrote: > > > ide-{disk,scsi,tape} don't support REQ_TYPE_BLOCK_PC requests et all > > (so attempts to use SG_IO, CDROM_SEND_PACKET and SCSI_IOCTL_SEND_COMMAND > >

Re: block/bsg.c

2007-07-17 Thread James Bottomley
On Tue, 2007-07-17 at 15:54 -0700, Andrew Morton wrote: > On Tue, 17 Jul 2007 17:19:15 -0500 > James Bottomley <[EMAIL PROTECTED]> wrote: > > > > Adding 1020116k swap on /dev/hdc3. Priority:-1 extents:1 across:1020116k > > > generic_ide_ioctl: cmd=21382 > > > generic_ide_ioctl: err=0 > > >

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
On Tue, 17 Jul 2007 17:19:15 -0500 James Bottomley <[EMAIL PROTECTED]> wrote: > > Adding 1020116k swap on /dev/hdc3. Priority:-1 extents:1 across:1020116k > > generic_ide_ioctl: cmd=21382 > > generic_ide_ioctl: err=0 > > generic_ide_ioctl: cmd=1 > > program scsi_unique_id is using a deprecated

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 22:52:25 +0200 > /* > * TODO > * - Should this get merged, block/scsi_ioctl.c will be migrated into > *this file. To keep maintenance down, it's e

Re: block/bsg.c

2007-07-17 Thread James Bottomley
gorithm > > > > yields: > > > > > > > > bsg: support for full generic block layer SG v3 > > > > > > > > which is not helpful. > > > > > > I agree, I did consider rebasing the merging all patches into a single >

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
On Tue, 17 Jul 2007 22:52:25 +0200 Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> wrote: > ide-{disk,scsi,tape} don't support REQ_TYPE_BLOCK_PC requests et all > (so attempts to use SG_IO, CDROM_SEND_PACKET and SCSI_IOCTL_SEND_COMMAND > will result in requests being failed and error messages in

Re: block/bsg.c

2007-07-17 Thread Bartlomiej Zolnierkiewicz
e generic SG (SCSI generic) v4 support for any block device. block/bsg.c: ... /* * TODO * - Should this get merged, block/scsi_ioctl.c will be migrated into *this file. To keep maintenance down, it's easier to have them *seperated right now. * */ This TODO shoul

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
ee, I did consider rebasing the merging all patches into a single > > commit prior to submission. In retrospect that would have been better, > > the bug fixes commits prior to inclusion is not that interesting. > > I'm doing a git-bisect and > > block/bsg.c: In fu

Re: block/bsg.c

2007-07-17 Thread James Bottomley
On Tue, 2007-07-17 at 12:48 -0700, Andrew Morton wrote: > On Tue, 17 Jul 2007 13:53:54 -0500 James Bottomley <[EMAIL PROTECTED]> wrote: > > > On Tue, 2007-07-17 at 12:19 +0200, Jens Axboe wrote: > > > > > Since Linus is happily snoring by now, could you test and see if the > > > > > tree works

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
On Tue, 17 Jul 2007 13:53:54 -0500 James Bottomley <[EMAIL PROTECTED]> wrote: > On Tue, 2007-07-17 at 12:19 +0200, Jens Axboe wrote: > > > > Since Linus is happily snoring by now, could you test and see if the > > > > tree works for you? > > > > > > It works for me. I'll submit some minor

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
xes commits prior to inclusion is not that interesting. I'm doing a git-bisect and block/bsg.c: In function 'bsg_register_queue': block/bsg.c:1014: error: 'struct kobject' has no member named 'dentry' That's easily fixable in config, but it's another reason for doing that consolidation prior to

Re: block/bsg.c

2007-07-17 Thread James Bottomley
I=y) && EXPERIMENTAL + depends on EXPERIMENTAL default y ---help--- Saying Y here will enable generic SG (SCSI generic) v4 diff --git a/block/bsg.c b/block/bsg.c index 576933f..1d9e6f7 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -1030,29 +1030,6 @@ err: }

Re: [PATCH] Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG (was: Re: block/bsg.c)

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, Geert Uytterhoeven wrote: > Don't define an empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG. > > It's embedded in struct request_queue, but there we have > > #if defined(CONFIG_BLK_DEV_BSG) > struct bsg_class_device bsg_dev; > #endif > > anyway. Thanks, applied.

[PATCH] Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG (was: Re: block/bsg.c)

2007-07-17 Thread Geert Uytterhoeven
Don't define an empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG. It's embedded in struct request_queue, but there we have #if defined(CONFIG_BLK_DEV_BSG) struct bsg_class_device bsg_dev; #endif anyway. Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- At first I considered

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, FUJITA Tomonori wrote: > From: Jens Axboe <[EMAIL PROTECTED]> > Subject: Re: block/bsg.c > Date: Tue, 17 Jul 2007 09:10:45 +0200 > > > On Tue, Jul 17 2007, FUJITA Tomonori wrote: > > > From: Jens Axboe <[EMAIL PROTECTED]> > > >

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 09:10:45 +0200 > On Tue, Jul 17 2007, FUJITA Tomonori wrote: > > From: Jens Axboe <[EMAIL PROTECTED]> > > Subject: Re: block/bsg.c > > Date: Tue, 17 Jul 2007 08:59:40 +0200 >

Re: block/bsg.c

2007-07-17 Thread Jan Engelhardt
On Jul 16 2007 16:57, Andrew Morton wrote: >A belated review (I've never seen this before and there it is in mainline) > >> static char bsg_version[] = "block layer sg (bsg) 0.4"; > >`const' would be better. That moves it into a write-protected memory section. Or perhaps MODULE_DESCRIPTION()

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:38:11 +0200 > > As a reader of this code I'm wondering "hm, why is > > BSG_SUB_PROTOCOL_SCSI_CMD unprivileged, while other modes require > > CAP_SYS_RAWIO"?. > &g

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, FUJITA Tomonori wrote: > From: Jens Axboe <[EMAIL PROTECTED]> > Subject: Re: block/bsg.c > Date: Tue, 17 Jul 2007 09:10:45 +0200 > > > On Tue, Jul 17 2007, FUJITA Tomonori wrote: > > > From: Jens Axboe <[EMAIL PROTECTED]> > > >

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 09:10:45 +0200 > On Tue, Jul 17 2007, FUJITA Tomonori wrote: > > From: Jens Axboe <[EMAIL PROTECTED]> > > Subject: Re: block/bsg.c > > Date: Tue, 17 Jul 2007 08:59:40 +0200 >

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, FUJITA Tomonori wrote: > From: Jens Axboe <[EMAIL PROTECTED]> > Subject: Re: block/bsg.c > Date: Tue, 17 Jul 2007 08:59:40 +0200 > > > On Tue, Jul 17 2007, FUJITA Tomonori wrote: > > > From: Jens Axboe <[EMAIL PROTECTED]> > > >

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:59:40 +0200 > On Tue, Jul 17 2007, FUJITA Tomonori wrote: > > From: Jens Axboe <[EMAIL PROTECTED]> > > Subject: Re: block/bsg.c > > Date: Tue, 17 Jul 2007 08:38:11 +0200 >

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, FUJITA Tomonori wrote: > From: Jens Axboe <[EMAIL PROTECTED]> > Subject: Re: block/bsg.c > Date: Tue, 17 Jul 2007 08:38:11 +0200 > > > On Mon, Jul 16 2007, Andrew Morton wrote: > > > > > > A belated review (I've never se

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:38:11 +0200 > On Mon, Jul 16 2007, Andrew Morton wrote: > > > > A belated review (I've never seen this before and there it is in mainline) > > > > > static char bsg_v

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Mon, Jul 16 2007, Andrew Morton wrote: > > A belated review (I've never seen this before and there it is in mainline) > > > static char bsg_version[] = "block layer sg (bsg) 0.4"; > > `const' would be better. That moves it into a write-protected memory section. Agree > > #define

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Mon, Jul 16 2007, Andrew Morton wrote: A belated review (I've never seen this before and there it is in mainline) static char bsg_version[] = block layer sg (bsg) 0.4; `const' would be better. That moves it into a write-protected memory section. Agree #define list_entry_bc(entry)

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:38:11 +0200 On Mon, Jul 16 2007, Andrew Morton wrote: A belated review (I've never seen this before and there it is in mainline) static char bsg_version[] = block layer sg (bsg) 0.4; `const

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:38:11 +0200 On Mon, Jul 16 2007, Andrew Morton wrote: A belated review (I've never seen this before and there it is in mainline) static char

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:59:40 +0200 On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:38:11 +0200 On Mon, Jul 16 2007, Andrew Morton wrote

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:59:40 +0200 On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:38:11

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 09:10:45 +0200 On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:59:40 +0200 On Tue, Jul 17 2007, FUJITA Tomonori wrote

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 09:10:45 +0200 On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:59:40

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:38:11 +0200 As a reader of this code I'm wondering hm, why is BSG_SUB_PROTOCOL_SCSI_CMD unprivileged, while other modes require CAP_SYS_RAWIO?. This design/policy decision maybe was discussed

Re: block/bsg.c

2007-07-17 Thread Jan Engelhardt
On Jul 16 2007 16:57, Andrew Morton wrote: A belated review (I've never seen this before and there it is in mainline) static char bsg_version[] = block layer sg (bsg) 0.4; `const' would be better. That moves it into a write-protected memory section. Or perhaps MODULE_DESCRIPTION() and

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 09:10:45 +0200 On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:59:40 +0200 On Tue, Jul 17 2007, FUJITA Tomonori wrote

Re: block/bsg.c

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 09:10:45 +0200 On Tue, Jul 17 2007, FUJITA Tomonori wrote: From: Jens Axboe [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 08:59:40

[PATCH] Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG (was: Re: block/bsg.c)

2007-07-17 Thread Geert Uytterhoeven
Don't define an empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG. It's embedded in struct request_queue, but there we have #if defined(CONFIG_BLK_DEV_BSG) struct bsg_class_device bsg_dev; #endif anyway. Signed-off-by: Geert Uytterhoeven [EMAIL PROTECTED] --- At first I considered

Re: [PATCH] Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG (was: Re: block/bsg.c)

2007-07-17 Thread Jens Axboe
On Tue, Jul 17 2007, Geert Uytterhoeven wrote: Don't define an empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG. It's embedded in struct request_queue, but there we have #if defined(CONFIG_BLK_DEV_BSG) struct bsg_class_device bsg_dev; #endif anyway. Thanks, applied. --

Re: block/bsg.c

2007-07-17 Thread James Bottomley
---help--- Saying Y here will enable generic SG (SCSI generic) v4 diff --git a/block/bsg.c b/block/bsg.c index 576933f..1d9e6f7 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -1030,29 +1030,6 @@ err: } EXPORT_SYMBOL_GPL(bsg_register_queue); -static int bsg_add(struct class_device

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
is not helpful. I agree, I did consider rebasing the merging all patches into a single commit prior to submission. In retrospect that would have been better, the bug fixes commits prior to inclusion is not that interesting. I'm doing a git-bisect and block/bsg.c: In function

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
On Tue, 17 Jul 2007 13:53:54 -0500 James Bottomley [EMAIL PROTECTED] wrote: On Tue, 2007-07-17 at 12:19 +0200, Jens Axboe wrote: Since Linus is happily snoring by now, could you test and see if the tree works for you? It works for me. I'll submit some minor patches against your

Re: block/bsg.c

2007-07-17 Thread James Bottomley
On Tue, 2007-07-17 at 12:48 -0700, Andrew Morton wrote: On Tue, 17 Jul 2007 13:53:54 -0500 James Bottomley [EMAIL PROTECTED] wrote: On Tue, 2007-07-17 at 12:19 +0200, Jens Axboe wrote: Since Linus is happily snoring by now, could you test and see if the tree works for you?

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
is not that interesting. I'm doing a git-bisect and block/bsg.c: In function 'bsg_register_queue': block/bsg.c:1014: error: 'struct kobject' has no member named 'dentry' That's easily fixable in config, but it's another reason for doing that consolidation prior to merging. So this rather

Re: block/bsg.c

2007-07-17 Thread Bartlomiej Zolnierkiewicz
) v4 support for any block device. block/bsg.c: ... /* * TODO * - Should this get merged, block/scsi_ioctl.c will be migrated into *this file. To keep maintenance down, it's easier to have them *seperated right now. * */ This TODO should be fixed/removed

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
On Tue, 17 Jul 2007 22:52:25 +0200 Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] wrote: ide-{disk,scsi,tape} don't support REQ_TYPE_BLOCK_PC requests et all (so attempts to use SG_IO, CDROM_SEND_PACKET and SCSI_IOCTL_SEND_COMMAND will result in requests being failed and error messages in the

Re: block/bsg.c

2007-07-17 Thread James Bottomley
to submission. In retrospect that would have been better, the bug fixes commits prior to inclusion is not that interesting. I'm doing a git-bisect and block/bsg.c: In function 'bsg_register_queue': block/bsg.c:1014: error: 'struct kobject' has no member named 'dentry' That's easily

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 22:52:25 +0200 /* * TODO * - Should this get merged, block/scsi_ioctl.c will be migrated into *this file. To keep maintenance down, it's easier to have them *seperated

Re: block/bsg.c

2007-07-17 Thread Andrew Morton
On Tue, 17 Jul 2007 17:19:15 -0500 James Bottomley [EMAIL PROTECTED] wrote: Adding 1020116k swap on /dev/hdc3. Priority:-1 extents:1 across:1020116k generic_ide_ioctl: cmd=21382 generic_ide_ioctl: err=0 generic_ide_ioctl: cmd=1 program scsi_unique_id is using a deprecated SCSI ioctl,

Re: block/bsg.c

2007-07-17 Thread James Bottomley
On Tue, 2007-07-17 at 15:54 -0700, Andrew Morton wrote: On Tue, 17 Jul 2007 17:19:15 -0500 James Bottomley [EMAIL PROTECTED] wrote: Adding 1020116k swap on /dev/hdc3. Priority:-1 extents:1 across:1020116k generic_ide_ioctl: cmd=21382 generic_ide_ioctl: err=0 generic_ide_ioctl:

Re: block/bsg.c

2007-07-17 Thread Bartlomiej Zolnierkiewicz
On Tuesday 17 July 2007, Andrew Morton wrote: On Tue, 17 Jul 2007 22:52:25 +0200 Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] wrote: ide-{disk,scsi,tape} don't support REQ_TYPE_BLOCK_PC requests et all (so attempts to use SG_IO, CDROM_SEND_PACKET and SCSI_IOCTL_SEND_COMMAND will result in

Re: block/bsg.c

2007-07-17 Thread Jeff Garzik
James Bottomley wrote: @@ -1052,9 +1054,10 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device int err, (*setfunc)(ide_drive_t *, int); u8 *val; - err = scsi_cmd_ioctl(file, bdev-bd_disk-queue, bdev-bd_disk, cmd, p); - if (err != -ENOTTY)

Re: block/bsg.c

2007-07-17 Thread FUJITA Tomonori
From: James Bottomley [EMAIL PROTECTED] Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 13:53:54 -0500 On Tue, 2007-07-17 at 12:19 +0200, Jens Axboe wrote: Since Linus is happily snoring by now, could you test and see if the tree works for you? It works for me. I'll submit some

Re: block/bsg.c

2007-07-17 Thread Bartlomiej Zolnierkiewicz
[ James, please remeber to cc: linux-ide on IDE patches, thanks. ] On Wednesday 18 July 2007, Jeff Garzik wrote: James Bottomley wrote: @@ -1052,9 +1054,10 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device int err, (*setfunc)(ide_drive_t *, int);

Re: block/bsg.c

2007-07-16 Thread Joseph Fannin
On Mon, Jul 16, 2007 at 04:57:06PM -0700, Andrew Morton wrote: > What does the code in bsg.c _do_, anyway?? Ho hum. It reformats the hard drive on Battlestar Galactica before the Cylon virus that has penetrated the firewalls keeps the power off long enough for the Centurions to vent the

Re: block/bsg.c

2007-07-16 Thread FUJITA Tomonori
From: "Satyam Sharma" <[EMAIL PROTECTED]> Subject: Re: block/bsg.c Date: Tue, 17 Jul 2007 06:22:25 +0530 > On 7/17/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > CONFIG_BLK_DEV_BSG=y > CONFIG_SCSI=m > > block/built-in.o: In function `bsg_

Re: block/bsg.c

2007-07-16 Thread Andrew Morton
On Mon, 16 Jul 2007 21:47:21 -0400 Jeff Garzik <[EMAIL PROTECTED]> wrote: > hrm. uninitialized_var(x) does not silence the warning, on my compiler: > > [EMAIL PROTECTED] misc-2.6]$ rpm -q gcc > gcc-4.1.2-13.fc6 > > @@ -1358,6 +1358,8 @@ udf_load_partition(struct super_block *sb, >

Re: block/bsg.c

2007-07-16 Thread Jeremy Fitzhardinge
Jeff Garzik wrote: > + uninitialized_var(ino.partitionReferenceNum); > + > if (!UDF_SB_LASTBLOCK(sb)) > > still yields > > fs/udf/super.c: In function ‘udf_fill_super’: > fs/udf/super.c:1359: warning: ‘ino.partitionReferenceNum’ may be used > uninitialized in this

Re: block/bsg.c

2007-07-16 Thread Jeff Garzik
hrm. uninitialized_var(x) does not silence the warning, on my compiler: [EMAIL PROTECTED] misc-2.6]$ rpm -q gcc gcc-4.1.2-13.fc6 @@ -1358,6 +1358,8 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr { kernel_lb_addr ino; +

Re: block/bsg.c

2007-07-16 Thread Jeff Garzik
Andrew Morton wrote: Yup, but the concern (from Al, iirc) was that someone could change the code later on, add a new bug and have that bug hidden by the unneeded initialisation. True. That's why #gccbug went the safe route, took the cost of extra instructions, and initialized it to zero.

Re: block/bsg.c

2007-07-16 Thread Andrew Morton
On Mon, 16 Jul 2007 20:58:11 -0400 Jeff Garzik <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: > > On Mon, 16 Jul 2007 20:47:45 -0400 Jeff Garzik <[EMAIL PROTECTED]> wrote: > > > >> Andrew Morton wrote: > >>> The modern way of shutting up gcc is uninitialized_var(). > >> > >> Should I convert

Re: block/bsg.c

2007-07-16 Thread Gabriel C
Satyam Sharma wrote: > On 7/17/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > > CONFIG_BLK_DEV_BSG=y > CONFIG_SCSI=m > > block/built-in.o: In function `bsg_init': > block/bsg.c:1097: undefined reference to `scsi_register_interface' > make: *** [.tmp_vml

Re: block/bsg.c

2007-07-16 Thread Jeff Garzik
Andrew Morton wrote: On Mon, 16 Jul 2007 20:47:45 -0400 Jeff Garzik <[EMAIL PROTECTED]> wrote: Andrew Morton wrote: The modern way of shutting up gcc is uninitialized_var(). Should I convert my misc-2.6.git#gccbug repository over to this, and push upstream? Opinions differ (a bit) but

Re: block/bsg.c

2007-07-16 Thread Andrew Morton
On Mon, 16 Jul 2007 20:47:45 -0400 Jeff Garzik <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: > > The modern way of shutting up gcc is uninitialized_var(). > > > Should I convert my misc-2.6.git#gccbug repository over to this, and > push upstream? Opinions differ (a bit) but personally I

Re: block/bsg.c

2007-07-16 Thread Satyam Sharma
On 7/17/07, Andrew Morton <[EMAIL PROTECTED]> wrote: CONFIG_BLK_DEV_BSG=y CONFIG_SCSI=m block/built-in.o: In function `bsg_init': block/bsg.c:1097: undefined reference to `scsi_register_interface' make: *** [.tmp_vmlinux1] Error 1 on latest -git. Satyam - To unsubscribe from thi

Re: block/bsg.c

2007-07-16 Thread Jeff Garzik
Andrew Morton wrote: The modern way of shutting up gcc is uninitialized_var(). Should I convert my misc-2.6.git#gccbug repository over to this, and push upstream? #gccbug branch is a set of places where I have verified that the variable is indeed initialized, even though gcc complains it

block/bsg.c

2007-07-16 Thread Andrew Morton
A belated review (I've never seen this before and there it is in mainline) > static char bsg_version[] = "block layer sg (bsg) 0.4"; `const' would be better. That moves it into a write-protected memory section. > struct bsg_device { > request_queue_t *queue; > spinlock_t lock; >

block/bsg.c

2007-07-16 Thread Andrew Morton
A belated review (I've never seen this before and there it is in mainline) static char bsg_version[] = block layer sg (bsg) 0.4; `const' would be better. That moves it into a write-protected memory section. struct bsg_device { request_queue_t *queue; spinlock_t lock;

Re: block/bsg.c

2007-07-16 Thread Jeff Garzik
Andrew Morton wrote: The modern way of shutting up gcc is uninitialized_var(). Should I convert my misc-2.6.git#gccbug repository over to this, and push upstream? #gccbug branch is a set of places where I have verified that the variable is indeed initialized, even though gcc complains it

Re: block/bsg.c

2007-07-16 Thread Satyam Sharma
On 7/17/07, Andrew Morton [EMAIL PROTECTED] wrote: CONFIG_BLK_DEV_BSG=y CONFIG_SCSI=m block/built-in.o: In function `bsg_init': block/bsg.c:1097: undefined reference to `scsi_register_interface' make: *** [.tmp_vmlinux1] Error 1 on latest -git. Satyam - To unsubscribe from this list: send

Re: block/bsg.c

2007-07-16 Thread Andrew Morton
On Mon, 16 Jul 2007 20:47:45 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Andrew Morton wrote: The modern way of shutting up gcc is uninitialized_var(). Should I convert my misc-2.6.git#gccbug repository over to this, and push upstream? Opinions differ (a bit) but personally I think the

Re: block/bsg.c

2007-07-16 Thread Jeff Garzik
Andrew Morton wrote: On Mon, 16 Jul 2007 20:47:45 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Andrew Morton wrote: The modern way of shutting up gcc is uninitialized_var(). Should I convert my misc-2.6.git#gccbug repository over to this, and push upstream? Opinions differ (a bit) but

Re: block/bsg.c

2007-07-16 Thread Gabriel C
Satyam Sharma wrote: On 7/17/07, Andrew Morton [EMAIL PROTECTED] wrote: CONFIG_BLK_DEV_BSG=y CONFIG_SCSI=m block/built-in.o: In function `bsg_init': block/bsg.c:1097: undefined reference to `scsi_register_interface' make: *** [.tmp_vmlinux1] Error 1 on latest -git. Should

Re: block/bsg.c

2007-07-16 Thread Andrew Morton
On Mon, 16 Jul 2007 20:58:11 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Andrew Morton wrote: On Mon, 16 Jul 2007 20:47:45 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Andrew Morton wrote: The modern way of shutting up gcc is uninitialized_var(). Should I convert my misc-2.6.git#gccbug

Re: block/bsg.c

2007-07-16 Thread Jeff Garzik
Andrew Morton wrote: Yup, but the concern (from Al, iirc) was that someone could change the code later on, add a new bug and have that bug hidden by the unneeded initialisation. True. That's why #gccbug went the safe route, took the cost of extra instructions, and initialized it to zero.

Re: block/bsg.c

2007-07-16 Thread Jeff Garzik
hrm. uninitialized_var(x) does not silence the warning, on my compiler: [EMAIL PROTECTED] misc-2.6]$ rpm -q gcc gcc-4.1.2-13.fc6 @@ -1358,6 +1358,8 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr { kernel_lb_addr ino; +

  1   2   >