Re: [RFC] implementing tape statistics single file vs multi-file in sysfs

2015-02-11 Thread Bryn M. Reeves
On Wed, Feb 11, 2015 at 06:30:27AM +0800, Greg KH wrote: > On Tue, Feb 10, 2015 at 02:27:20PM +0000, Bryn M. Reeves wrote: > > On Sat, Feb 07, 2015 at 12:07:43PM +0800, Greg KH wrote: > > > > $ cat /sys/fs/selinux/avc/cache_stats > > lookups hits misses allocations

Re: [RFC] implementing tape statistics single file vs multi-file in sysfs

2015-02-10 Thread Bryn M. Reeves
On Sat, Feb 07, 2015 at 12:07:43PM +0800, Greg KH wrote: > On Fri, Feb 06, 2015 at 03:41:58PM +0000, Bryn M. Reeves wrote: > > I can't speak for Shane but wouldn't spend too much time looking at the > > current v2 patch: it's the result of a pretty ugly compromi

Re: [RFC] implementing tape statistics single file vs multi-file in sysfs

2015-02-06 Thread Bryn M. Reeves
but that's usually because people forgot > why we had this rule, and no one noticed or pointed it out to me that it > was wrong. Perhaps sysfs.txt should be updated to make the position more clear? The current wording seems rather more liberal than this thread would suggest. Maybe some

Re: [RFC] implementing tape statistics single file vs multi-file in sysfs

2015-02-06 Thread Bryn M. Reeves
On Fri, Feb 06, 2015 at 12:20:53AM +, Seymour, Shane M wrote: > There has been some ongoing discussion about the best way to implement > tape statistics. The original method suggested a long time ago used a > single file in sysfs similar to block statistics in sysfs. That lead to > an impass ab

Re: [PATCH] st: implement sysfs based tape statistics v2

2015-02-05 Thread Bryn M. Reeves
On Thu, Feb 05, 2015 at 10:55:50AM -0800, James Bottomley wrote: > OK, the sysfs bikeshedders hang out on linux-api > > https://www.kernel.org/doc/man-pages/linux-api-ml.html > > If you can convince them, we'll do the single file approach. Will do - I've got a couple of stats projects on the go

Re: [PATCH] st: implement sysfs based tape statistics v2

2015-02-05 Thread Bryn M. Reeves
On Thu, Feb 05, 2015 at 07:46:32PM +0200, "Kai Mäkisara (Kolumbus)" wrote: > > On 5.2.2015, at 19.40, Laurence Oberman wrote: > > From: "Kai Mäkisara (Kolumbus)" > > I still think that the tape statistics should be exported like the > > statistics of “real” block devices, i.e., one sysfs file ex

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread Bryn M. Reeves
On Tue, Jul 08, 2014 at 12:15:54AM +0800, loody wrote: > so sg_read will not hammer on the page cache like dd without "iflags=direct" > > thanks for your kind help, The sg_read program (and other programs in sg3_utils) sends a command directly to the device using an SG_IO ioctl. This bypasses all

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread Bryn M. Reeves
On Mon, Jul 07, 2014 at 11:39:05PM +0800, loody wrote: > hi David: > > 2014-07-07 23:06 GMT+08:00 David Laight : > > From: Lars Melin > > ... > >> sgread is not included in BusyBox but you should have "touch". > >> Create a dummy file on the disk and let cron touch it every 4 minutes. > > > > You

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread Bryn M. Reeves
On Sun, Jul 06, 2014 at 01:18:03AM +0800, loody wrote: > hi all: > we met a USB Hard Disk that will go to suspend if host stop > sending scsi command over 5mins. > To save the IO, kernel will keep the file in page cache as much as > he can and under this circumstances, the scsi command may

Re: help decoding aacraid errors (3.10.40 kernel)

2014-06-27 Thread Bryn M. Reeves
On Fri, Jun 27, 2014 at 12:59:18PM +0200, Arkadiusz Miskiewicz wrote: > Thanks for links. I wonder why kernel doesn't decode these to be actually > readable without a need for asking on ml - was decoding considered? Normally it does; I was a bit surprised to see numbers printed with such a recent

Re: help decoding aacraid errors (3.10.40 kernel)

2014-06-27 Thread Bryn M. Reeves
On Fri, Jun 27, 2014 at 10:55:08AM +0200, Arkadiusz Miskiewicz wrote: > [3757350.671860] Result: hostbyte=0x00 driverbyte=0x08 > [3757350.671862] sd 0:0:2:0: [sdc] > [3757350.671863] Sense Key : 0x4 [current] http://www.t10.org/lists/2sensekey.htm 0x4 is "hardware error". > [3757350.671866] s

Re: External USB3 disk fails with "Invalid field in cdb"

2014-06-27 Thread Bryn M. Reeves
On Thu, Jun 26, 2014 at 08:55:19PM +0200, Michael Büsch wrote: > Jun 26 20:47:14 wiggum kernel: [156019.870310] sd 22:0:0:0: [sdb] 976773168 > 512-byte logical blocks: (500 GB/465 GiB) > Jun 26 20:47:14 wiggum kernel: [156019.870653] sd 22:0:0:0: [sdb] Write > Protect is off > Jun 26 20:47:14 wig

Re: debug_flag added to st tape driver

2014-06-10 Thread Bryn M. Reeves
On Tue, Jun 10, 2014 at 04:57:06PM -0400, Laurence Oberman wrote: > I am tired of building modules to enable SCSI tape driver debug so I > am hoping this patch is acceptable. > Tested using kernel 3.14.6 > > Usage example: > modprobe st debug_flag=1 Missing Signed-off-by :-) > +module_param_nam

Re: scsi_debug driver puzzle

2014-03-31 Thread Bryn M. Reeves
On 03/31/2014 06:32 PM, Laurence Oberman wrote: > File Line > 0 scsi_debug.c 3551 int scsi_debug_queuecommand_lck(struct scsi_cmnd > *SCpnt, done_funct_t done) > 1 scsi_debug.c 3900 static DEF_SCSI_QCMD(scsi_debug_queuecommand) > 2 scsi_debug.c 3912 .queuecommand = scsi_debug_queuecomman

Re: [PATCH] scsi: Allow error handling timeout to be specified

2013-05-10 Thread Bryn M. Reeves
On 05/10/2013 03:24 PM, Hannes Reinecke wrote: However, this time is only defined _on the initiator_. The specification does _NOT_ have any fixed timeout values for _any_ command. As such it could in theory (and does, if you happen to run against certain arrays under certain conditions) take seve

Re: [PATCH] scsi: Allow error handling timeout to be specified

2013-05-10 Thread Bryn M. Reeves
On 05/10/2013 01:43 PM, Ewan Milne wrote: On Thu, 2013-05-09 at 23:11 -0400, Martin K. Petersen wrote: Introduce eh_timeout which can be used for error handling purposes. This was previously hardcoded to 10 seconds in the SCSI error handling code. However, for some fast-fail scenarios it is nece

Re: [PATCH 2/2] dm mpath: attach scsi_dh during table resume

2013-04-25 Thread Bryn M. Reeves
On 04/25/2013 04:37 PM, Mike Snitzer wrote:> clariion_match does more than check the vendor and product; if tpgs is > set (ALUA mode) it returns false. > > So yes, while there is room for improvement in clariion_match the > current code should work just fine with reasoning between emc and alua.

Re: [PATCH 2/2] dm mpath: attach scsi_dh during table resume

2013-04-25 Thread Bryn M. Reeves
On 04/25/2013 03:50 PM, Mikulas Patocka wrote: On Thu, 25 Apr 2013, Mike Snitzer wrote: The handler that is automatically attached _should_ be the correct handler. We now have the .match() hook for scsi_dh and it has made for reliable scsi_dh attachment of the correct handler. The EMC devices

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bryn M. Reeves
On 03/15/2013 12:46 PM, Bart Van Assche wrote: The SCSI EH keeps trying until all outstanding request have been finished. Does lpfc_host_reset_handler() invoke scsi_done() for I don't think so (ends up calling lpfc_sli_cancel_iocbs() via lpfc_hba_down_post() after shutting down the mailbox) bu

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bryn M. Reeves
On 03/15/2013 12:24 PM, Bart Van Assche wrote: On 03/15/13 12:55, Hannes Reinecke wrote: And the LLDD is forced into error recovery which'll take _ages_ as each and every command send during error recovery will time out. Hello Hannes, I'm analyzing a related but not identical issue with SRP.

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bryn M. Reeves
On 03/15/2013 11:55 AM, Hannes Reinecke wrote: Rationale for this patch is a weird test case with brocade switches; there you can actually disable a _target_ port. So the port isn't reachable anymore but no RSCN is send. I think it's more than a pure test-case; using the rscnsupr feature on th

Re: How to online remove an error scsi disk from the system?

2013-02-01 Thread Bryn M. Reeves
On 02/01/2013 11:13 AM, Tao Ma wrote: You don't mention the versions of the kernel and driver you're using - if the system is in production I would suggest contacting who ever normally provides support for the kernel and distribution that you are running. We use CentOS6.2 and the kernel version

Re: How to online remove an error scsi disk from the system?

2013-02-01 Thread Bryn M. Reeves
On 02/01/2013 09:59 AM, Tao Ma wrote: yes, but the result is the same. It will do some IO first which will cause this command hang. You seem to have a problem with either the device/adapter or in the driver. The backtrace you posted shows that jbd2 (ext4) is still waiting on IO that's been su

Re: How to online remove an error scsi disk from the system?

2013-02-01 Thread Bryn M. Reeves
On 02/01/2013 07:54 AM, Bart Van Assche wrote: * proc_scsi_write - handle writes to /proc/scsi/scsi * @file: not used * @buf: buffer to write * @length: length of buf, at most PAGE_SIZE * @ppos: not used * * Description: this provides a legacy mechanism to add or remove * devices