Re: [PATCH] sg_io: allow UNMAP and WRITE SAME without CAP_SYS_RAWIO

2012-09-12 Thread James Bottomley
On Tue, 2012-09-11 at 19:56 +0200, Paolo Bonzini wrote: > The set of use cases is so variable that no single filter can accomodate > all of them: high availability people want persistent reservations, NAS > people want trim/discard, but these are just two groups. Someone is > using a Windows VM to

Re: [PATCH] sg_io: allow UNMAP and WRITE SAME without CAP_SYS_RAWIO

2012-09-12 Thread Paolo Bonzini
Il 12/09/2012 10:05, James Bottomley ha scritto: > This is why the whole filter thing was mutable via sysfs. That way the > admin could set this up per device. It sounds like this is what you > want to fix, rather than opening up more holes in an already leaky > security apparatus. It is, thanks

[PATCH v7 0/6] ZPODD patches

2012-09-12 Thread Aaron Lu
v7: Re work of runtime pm of sr driver, based on ideas of Alan Stern and Oliver Neukum. Jeff, due to the ready_to_power_off flag added, there is a small change in [PATCH v7 6/6] libata: acpi: respect may_power_off flag, please check if I can still get your ack, thanks. v6: When user changes may_p

[PATCH v7 1/6] block: genhd: add an interface to set disk poll interval

2012-09-12 Thread Aaron Lu
Signed-off-by: Aaron Lu --- block/genhd.c | 23 +-- include/linux/genhd.h | 1 + 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index cac7366..4244256 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1627,6 +1627,19 @@

[PATCH v7 3/6] scsi: sr: support zero power ODD(ZPODD)

2012-09-12 Thread Aaron Lu
When ODD is runtime suspended, we will check if it is OK to remove its power: 1 For tray type, no medium inside and tray closed; 2 For slot type, no medium inside. And if yes, we will set the ready_to_power_off flag as an indication to ATA layer that it is safe to place this device into ACPI D3 col

[PATCH v7 2/6] scsi: sr: support runtime pm

2012-09-12 Thread Aaron Lu
Place the ODD into runtime suspend state as soon as there is nobody using it. The only exception is, if we just find that a new medium is inserted, we wait for the next events checking to idle it. Based on ideas of Alan Stern and Oliver Neukum. Signed-off-by: Aaron Lu --- drivers/scsi/sr.c | 29

[PATCH v7 6/6] libata: acpi: respect may_power_off flag

2012-09-12 Thread Aaron Lu
If user does not want the device to be powered off when runtime suspended by setting may_power_off flag to 0, we will not choose D3 cold for it. Signed-off-by: Aaron Lu --- drivers/ata/libata-acpi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/ata/libata-acpi.c

[PATCH v7 4/6] scsi: pm: add may_power_off flag

2012-09-12 Thread Aaron Lu
Add a new flag may_power_off for scsi device, it gives the user a chance to control when the device is runtime suspended, can we remove its power if possible. And if the device can be powered off(reflected by can_power_off flag, determined by individual driver), create a sysfs entry named may_powe

[PATCH v7 5/6] scsi: sr: use may_power_off

2012-09-12 Thread Aaron Lu
If may_power_off is 0, we do not check if it is ready to be powered off in its suspend callback. Signed-off-by: Aaron Lu --- drivers/scsi/sr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index ef72682..4c1a182 100644 --- a/driver

[PATCH 0/3] block: add queue-private command filter, editable via sysfs

2012-09-12 Thread Paolo Bonzini
[sorry for the resend, I used a wrong mailing list address] The set of use cases for SG_IO is quite variable that no single filter can accomodate all of them. The current filter is tailored very much to CD burning, and includes many MMC-specific commands that may have other meanings in different

[PATCH 1/3] block: add back queue-private command filter

2012-09-12 Thread Paolo Bonzini
The command filter used to be mutable via sysfs, but this was broken and backed out. Let's add it back. This patch adds the infrastructure for filtering, but unlike the old code this one just adds a pointer to request_queue, so as to make it cheaper in the majority of cases where no special filte

[PATCH 2/3] scsi: create an all-zero filter for scanners

2012-09-12 Thread Paolo Bonzini
Using /dev/sg for scanners is blocked from unprivileged users. Reimplement this using customizable command filters, so that the sysfs knobs will work in this case too. Cc: linux-scsi@vger.kernel.org Signed-off-by: Paolo Bonzini --- drivers/scsi/scsi_scan.c |6 +- drivers/scsi/sg.c

[PATCH 3/3] block: add back command filter modification via sysfs

2012-09-12 Thread Paolo Bonzini
This adds two new sysfs attributes to the queue kobject. The attributes allow reading and writing the whitelist of unprivileged commands. This is again a bit different from what was removed in commit 018e044 (block: get rid of queue-private command filter, 2009-06-26), but the idea is the same.

[V4 PATCH 0/8] csiostor: Chelsio FCoE offload driver submission

2012-09-12 Thread Naresh Kumar Inna
This is the initial submission of the Chelsio FCoE offload driver (csiostor) to the upstream kernel. This driver currently supports FCoE offload functionality over Chelsio T4-based 10Gb Converged Network Adapters. The following patches contain the driver sources for csiostor driver and updates to

[V4 PATCH 2/8] csiostor: Chelsio FCoE offload driver submission (headers part 1).

2012-09-12 Thread Naresh Kumar Inna
This patch contains the first set of the header files for csiostor driver. Signed-off-by: Naresh Kumar Inna --- V2: - Removed csio_fcoe_proto.h, using defines from include/scsi/fc instead. - Removed driver-specific return values, using errno values instead. - Retained CSIO_INC_STATS, since it is

[V4 PATCH 3/8] csiostor: Chelsio FCoE offload driver submission (headers part 2).

2012-09-12 Thread Naresh Kumar Inna
This patch contains the second set of the header files for csiostor driver. Signed-off-by: Naresh Kumar Inna --- drivers/scsi/csiostor/csio_lnode.h | 255 ++ drivers/scsi/csiostor/csio_mb.h| 278 +++ drivers/scsi/csiostor/csio_rnode.h | 141 ++ driv

[V4 PATCH 1/8] cxgb4/cxgb4vf: Chelsio FCoE offload driver submission (common header updates).

2012-09-12 Thread Naresh Kumar Inna
This patch contains updates to firmware/hardware header files shared between csiostor and cxgb4/cxgb4vf, and the resulting changes to the cxgb4/cxgb4vf source files. Signed-off-by: Naresh Kumar Inna --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c |2 +- drivers/net/ethernet/chelsio/cxgb4

Re: [PATCH 3/3] block: add back command filter modification via sysfs

2012-09-12 Thread Alan Cox
O > + if (!q->cmd_filter) { > + q->cmd_filter = kmalloc(sizeof(struct blk_cmd_filter), > + GFP_KERNEL); > + blk_set_cmd_filter_defaults(q->cmd_filter); Out of memory - memset - oops -- To unsubscribe from this list: send the line "uns

Re: [PATCH 3/3] block: add back command filter modification via sysfs

2012-09-12 Thread Alan Cox
> +ssize_t blk_filter_store(struct request_queue *q, > + const char *page, size_t count, int rw) > +{ > + unsigned long okbits[BLK_SCSI_CMD_PER_LONG], *target_okbits; > + bool set; > + const char *p = page; > + char *endp; > + int start = -1, cmd; > + > +

Re: [PATCH 3/3] block: add back command filter modification via sysfs

2012-09-12 Thread Paolo Bonzini
Il 12/09/2012 14:41, Alan Cox ha scritto: >> > + if (!q->cmd_filter) { >> > + q->cmd_filter = kmalloc(sizeof(struct blk_cmd_filter), >> > + GFP_KERNEL); >> > + blk_set_cmd_filter_defaults(q->cmd_filter); >> > + } >> > + > This also needs CAP_SYS_

Re: [V3 PATCH 9/9] cxgb4vf: Chelsio FCoE offload driver submission (header compatibility fixes).

2012-09-12 Thread Andi Kleen
Naresh Kumar Inna writes: > > OK, I think I should be able to arrange the patch set to fulfill that > requirement. I was under the impression it was fine for new drivers to > split patches in this fashion, since they go as a single commit, sorry > about that. What they normally do then is to add

[PATCH 2/15] drivers/scsi/bfa: removes unnecessary semicolon

2012-09-12 Thread Peter Senna Tschudin
From: Peter Senna Tschudin removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin --- drivers/scsi/bfa/bfa_fcs_lport.c |2 +- drivers/scsi/bfa/bfa_fcs_rport.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --

[PATCH 8/15] drivers/scsi: removes unnecessary semicolon

2012-09-12 Thread Peter Senna Tschudin
From: Peter Senna Tschudin removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin --- drivers/scsi/ibmvscsi/ibmvfc.c | 36 ++-- drivers/scsi/ibmvscsi/ibmvstgt.c |2 +- drivers/scsi/qlogicpti.c

[PATCH 6/15] drivers/scsi/pmcraid.c: removes unnecessary semicolon

2012-09-12 Thread Peter Senna Tschudin
From: Peter Senna Tschudin removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin --- drivers/scsi/pmcraid.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c i

Re: [V3 PATCH 9/9] cxgb4vf: Chelsio FCoE offload driver submission (header compatibility fixes).

2012-09-12 Thread Naresh Kumar Inna
On 9/12/2012 10:22 PM, Andi Kleen wrote: > Naresh Kumar Inna writes: >> >> OK, I think I should be able to arrange the patch set to fulfill that >> requirement. I was under the impression it was fine for new drivers to >> split patches in this fashion, since they go as a single commit, sorry >> ab

Re: [RFC PATCH 1/5] libfcoe, fcoe: Allow user to set a ctlr's mode

2012-09-12 Thread Love, Robert W
On Mon 10 Sep 2012 10:51:41 PM PDT, Bart Van Assche wrote: > On 09/11/12 00:59, Robert Love wrote: >> +static enum fip_conn_type fcoe_parse_mode(const char *buf, >> + const struct fcoe_ctlr_mode_table *tbl) >> +{ >> +int modeint = -1, i, rv; >> +char *p, modestr

Re: [Open-FCoE] [RFC PATCH 0/5] Reorganize libfcoe control interfaces

2012-09-12 Thread Love, Robert W
On 12-09-11 10:36 AM, Love, Robert W wrote: > On Tue 11 Sep 2012 10:06:29 AM PDT, Chris Leech wrote: >> On Mon, Sep 10, 2012 at 3:59 PM, Robert Love wrote: > This feels a little awkward with all the special control files. Have > you thought about something designed for creating kernel objects,

Re: [PATCH 0/4] PCI error handler const

2012-09-12 Thread Bjorn Helgaas
On Fri, Sep 7, 2012 at 4:42 PM, Bjorn Helgaas wrote: > On Fri, Sep 7, 2012 at 9:33 AM, Stephen Hemminger > wrote: >> This is a trivial patch to make PCI error handler function >> tables const. Split into pieces so that core changes are first. > > I put all four of these on this branch: > > http:

Re: [PATCH] Fix a use-after-free triggered by device removal

2012-09-12 Thread Tejun Heo
Hello, On Tue, Sep 11, 2012 at 08:42:28AM +0200, Bart Van Assche wrote: > Good question. As far as I can see calling request_queue.request_fn() is > fine as long as the caller holds a reference on the queue. If e.g. > scsi_request_fn() would get invoked after blk_drain_queue() finished it > will r

RE: [PATCH v6 0/7] ZPODD patches

2012-09-12 Thread Jack Wang
Hi Aaron, This feature looks nice, but how could I test this patch set, I suppose it need special Hardware which support ZPODD, could suggest the test setup environment? For hard disk runtime power off, Is there (hardware?) requirement for hard drive to support similar feature? Best regards! Ja

Re: [PATCH v6 0/7] ZPODD patches

2012-09-12 Thread Aaron Lu
On 09/13/2012 10:42 AM, Jack Wang wrote: > Hi Aaron, Hi Jack, > > This feature looks nice Glad to hear this :-) > but how could I test this patch set, I suppose it > need special Hardware which support ZPODD, could suggest the test setup > environment? For ZPODD, there are 2 requirements: 1 T