Re: [Patch][RFC] st: provide tape statistics via sysfs

2013-02-26 Thread Kai Mäkisara
gt;> first attempt at a kernel patch so please be gentle. >> >> This patch was written to enable tape statistics via sysfs for the dt >> driver based on kernel 3.8.0-rc6. It creates two new files in sysfs >> and is based on work done previously in 2005 by Kai Mäkisara. Any

Re: [PATCH] st: convert to using driver attr groups for sysfs

2015-06-24 Thread Kai Mäkisara (Kolumbus)
> On 23.6.2015, at 11.11, Seymour, Shane M wrote: > > This patch changes the st driver to use attribute groups so > driver sysfs files are created automatically. See the > following for reference: > > http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correct

Re: [PATCH v2] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Kai Mäkisara (Kolumbus)
igned-off-by: Shane Seymour > --- > This patch was implemented on top of the previous patch to > convert to using driver attr groups. > > Changes from v1: > - switched to scnprintf from sprintf after feedback from Sergey > Senozhatsky. Acked-by: Kai Mäkisara Thanks, Kai

Re: [PATCH] st: null pointer dereference panic caused by use after kref_put by st_open

2015-07-02 Thread Kai Mäkisara (Kolumbus)
r the kref_put() is done on it in st_open(). > > Signed-off-by: Shane Seymour > Signed-off-by: Darren Lavender Acked-by: Kai Mäkisara Thanks for finding this. No code should touch an object after put(). Thanks, Kai -- To unsubscribe from this list: send the line "unsubscribe l

Re: [PATCH] st: Destroy st_index_idr on module exit

2015-07-10 Thread Kai Mäkisara (Kolumbus)
> On 8.7.2015, at 18.24, Johannes Thumshirn wrote: > > Destroy st_index_idr on module exit, reclaiming the allocated memory. > > This was detected by the following semantic patch (written by Luis Rodriguez > ) > ... > > Signed-off-by: Johannes Thumshirn Acked-by:

Re: [PATCH] st: allow debug output to be enabled or disabled via sysfs

2015-10-13 Thread Kai Mäkisara (Kolumbus)
ve if it is in use. > Good justification for the feature. Acked-by: Kai Mäkisara Thanks, Kai -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: What partition should the MTMKPART argument specify? Was: Re: st driver doesn't seem to grok LTO partitioning

2016-01-28 Thread Kai Mäkisara (Kolumbus)
> On 28.1.2016, at 9.36, Seymour, Shane M wrote: > > Hi Kai, > > With the changes the I get a failure partitioning a HP DAT72 drive (DDS-5): > > # ./mt -f /dev/st1 stsetoption debug > # ./mt -f /dev/st1 stsetoption can-partitions > # ./mt -f /dev/st1 mkpartition 1000 > /dev/st1: Input/output e

Re: What partition should the MTMKPART argument specify? Was: Re: st driver doesn't seem to grok LTO partitioning

2016-01-28 Thread Kai Mäkisara (Kolumbus)
> On 27.1.2016, at 1.35, Seymour, Shane M wrote: > > Hi Emmanuel, > >> Hmm in fact if we keep using MB we'll be stuck when tapes reach ~2 PB >> which leaves some time to think about it, until LTO-15 circa 2036 :) > > There will be other issues to solve before then (by LTO-9 2 with compression

Re: What partition should the MTMKPART argument specify? Was: Re: st driver doesn't seem to grok LTO partitioning

2016-01-28 Thread Kai Mäkisara (Kolumbus)
> On 28.1.2016, at 21.21, Laurence Oberman wrote: > > Hi Kai > > What kernel was the last patch you attached against. > It was against the latest git version from Jan 24 evening (Finnish time). It is 4.4.0 plus from 4.5 merge window. The patch applies to 3.18.25 with offsets and should apply

Re: What partition should the MTMKPART argument specify? Was: Re: st driver doesn't seem to grok LTO partitioning

2016-02-01 Thread Kai Mäkisara (Kolumbus)
> On 1.2.2016, at 8.31, Seymour, Shane M wrote: > > Hi Kai, > > Thanks for the changes the HPE DAT72 DDS5 drive now works as expected: > Good. Thanks for testing. ... > > I'm asking around again one final time to see if I can lay my hands on a LTO5 > or greater drive so I can test LTO parti

Re: What partition should the MTMKPART argument specify? Was: Re: st driver doesn't seem to grok LTO partitioning

2016-02-04 Thread Kai Mäkisara (Kolumbus)
> On 4.2.2016, at 3.43, Seymour, Shane M wrote: > > Hi Kai, > > Tested with patched kernel 4.5.0-rc2-next-20160202+. It's looking good > everything partition related passed with DDS5 and LTO6. You can definitely > add me as a tested-by. I did find one issue below but it's not related to the

Re: [PATCH] st: trivial: remove form feed characters

2015-11-04 Thread Kai Mäkisara (Kolumbus)
> On 4.11.2015, at 11.52, Maurizio Lombardi wrote: > > Signed-off-by: Maurizio Lombardi > --- > drivers/scsi/st.c | 24 > 1 file changed, 8 insertions(+), 16 deletions(-) > > diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c > index b37b9b0..7c4e518 100644 > --- a/driv

Re: [PATCH] [SCSI] st: Remove obsolete scsi_tape.max_pfn

2015-11-17 Thread Kai Mäkisara (Kolumbus)
> On 15.11.2015, at 13.48, Geert Uytterhoeven wrote: > > Its last user was removed 10 years ago, in commit > 8b05b773b6030de5 ("[SCSI] convert st to use scsi_execute_async"). > > Signed-off-by: Geert Uytterhoeven Acked-by: Kai Mäkisara Thanks, Kai -- To unsu

Re: [PATCH V2] st: fix potential null pointer dereference.

2015-11-24 Thread Kai Mäkisara (Kolumbus)
oving the STm->cdevs[rew] pointer > initialization before the call to cdev_add(). > It also sets STm->devs[rew] and STm->cdevs[rew] to NULL in > case of failure. > > Signed-off-by: Maurizio Lombardi Acked-by: Kai Mäkisara Thanks, Kai -- To unsubscribe from this list: send

Re: st driver doesn't seem to grok LTO partitioning

2015-12-21 Thread Kai Mäkisara (Kolumbus)
> On 21.12.2015, at 14.46, Emmanuel Florac wrote: > > Le Fri, 18 Dec 2015 17:06:44 +0100 > Emmanuel Florac écrivait: > >> >> I'm trying to use mt to work with LTO-5 and bigger tapes. Switching >> partitions works: >> >> # tapeinfo -f /dev/sg1 >> Product Type: Tape Drive >> Vendor ID: 'HP

Re: st driver doesn't seem to grok LTO partitioning

2015-12-21 Thread Kai Mäkisara (Kolumbus)
> On 21.12.2015, at 19.57, Emmanuel Florac wrote: > > Le Mon, 21 Dec 2015 19:25:27 +0200 > "Kai Mäkisara (Kolumbus)" écrivait: > >>> >>> I'm replying to myself: this is very obviously a limitation of the >>> st driver. Checking st.c p

Re: st driver doesn't seem to grok LTO partitioning

2015-12-29 Thread Kai Mäkisara (Kolumbus)
> On 29.12.2015, at 18.59, Emmanuel Florac wrote: > > Le Fri, 25 Dec 2015 17:53:46 +0200 (EET) > Kai Makisara écrivait: > >> the patch implements the following: if the >> size is 1, the driver tells the drive to use default partitioning for >> two partitions. For the HP Ultrium this should r

Re: st driver doesn't seem to grok LTO partitioning

2015-12-29 Thread Kai Mäkisara (Kolumbus)
> On 29.12.2015, at 18.58, Emmanuel Florac wrote: > > Le Fri, 25 Dec 2015 17:53:46 +0200 (EET) > Kai Makisara écrivait: > >> The patch uses the scsi level of the device to separate processing. >> The FORMAT MEDIUM command is defined in SCSI-3 and I suppose that no >> current drive is still SCS

Re: st driver doesn't seem to grok LTO partitioning

2015-12-30 Thread Kai Mäkisara (Kolumbus)
> On 30.12.2015, at 20.33, Emmanuel Florac wrote: > > Le Wed, 30 Dec 2015 19:54:01 +0200 (EET) > Kai Makisara écrivait: > >> I think I found out why it did not work with the default format. At >> the end of this message you find a new patch that should correct >> that. There are also other cha

Re: st driver doesn't seem to grok LTO partitioning

2015-12-31 Thread Kai Mäkisara (Kolumbus)
> On 30.12.2015, at 23.24, Emmanuel Florac wrote: > > Le Wed, 30 Dec 2015 21:21:47 +0200 > "Kai Mäkisara (Kolumbus)" écrivait: > >> This happens if the position is not at the beginning of partition 0. >> Could you try to switch to partition 0: >> m

What partition should the MTMKPART argument specify? Was: Re: st driver doesn't seem to grok LTO partitioning

2016-01-21 Thread Kai Mäkisara (Kolumbus)
> On 15.1.2016, at 2.21, Seymour, Shane M wrote: > > Unfortunately I'm unable to lay my hands on an LTO 5 tape drive so I'm not > able to test that it works either. If it helps at all I can test in the > negative and make sure that for an LTO 3 drive it fails gracefully but that's > about it

Re: [PATCH]: add debug flag parameter for SCSI tape driver - 2nd request

2014-10-19 Thread Kai Mäkisara (Kolumbus)
Hello, I am responding to this, but noticed your next, fixed version. > On 17.10.2014, at 23.20, Laurence Oberman wrote: > > Hello Kai > > You have seen this patch before. The first time around, given that we don't > enable DEBUG by default, I let it go. > However we have been looking into de

Re: [PATCH]: add debug flag parameter for SCSI tape driver - 2nd request

2014-10-19 Thread Kai Mäkisara (Kolumbus)
1 is the default with this patch. > > Usage: modprobe st debug_flag=1 > > Signed-off-by: Laurence Oberman Acked-by: Kai Mäkisara Thanks, Kai > > diff -Nur a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt > --- a/Documentation/scsi/st.txt 2014-10-19 09:36:52.243863716

Re: PATCH: st.c: Fix blk_get_queue usage

2013-11-14 Thread Kai Mäkisara (Kolumbus)
On 14.11.2013, at 16.48, Bodo Stroesser wrote: > Hi, > > in st_probe(), st.c I stumbled across what I'd call a minor problem. > > So I'd like to suggest the following patch. > > Best Regards, > Bodo > > P.S.: Please CC me, I'm not on the list. > > ---

Re: [PATCH 1/3] st.ko: fix enlarge_buffer

2013-12-16 Thread Kai Mäkisara (Kolumbus)
dy is full. > As enlarge_buffer uses different page allocation orders > depending on the size of the buffer needed, the check does not > make sense. > Yes, it is not useful any more. It may have been necessary at some time but I am now not sure about that either ;-) > Cc: Kai Makisa

Re: [PATCH 2/3] st.ko: remove unnecessary normalize_buffer

2013-12-16 Thread Kai Mäkisara (Kolumbus)
On 2.12.2013, at 21.00, Bodo Stroesser wrote: > From: Bodo Stroesser > Date: Mon, 2 Dec 2013 18:52:10 +0100 > Subject: [PATCH 2/3] st.ko: remove unnecessary normalize_buffer > > This patch removes an unnecessary call to normalize_buffer() > in enlarge_buffer() > > In st_open() always a buffer

Re: [PATCH 3/3] st.ko: change enlarge_buffer result

2013-12-16 Thread Kai Mäkisara (Kolumbus)
On 2.12.2013, at 21.00, Bodo Stroesser wrote: > From: Bodo Stroesser > Date: Mon, 2 Dec 2013 18:52:10 +0100 > Subject: [PATCH 3/3] st.ko: change enlarge_buffer result > > enlarge_buffer() just returns 1 or 0 if it could or could > not allocate the requested buffer. > > In case of result 0, th

Re: [PATCH] scsi: int overflow in st_ioctl()

2013-12-17 Thread Kai Mäkisara (Kolumbus)
On 17.12.2013, at 16.43, Yongjian Xu xuyongjia...@gmail.com wrote: > From: Yongjian Xu > > mtc.mt_count comes from user-space. > int overflow may occur: > mtc.mt_count++; > mtc.mt_count—; I agree that this is a problem. However, it seems that there is also another problem: the SPACE command us

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-01 Thread Kai Mäkisara (Kolumbus)
On 1.2.2014, at 16.06, Hannes Reinecke wrote: > On 01/31/2014 05:43 PM, Jeremy Linton wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 1/31/2014 2:46 AM, Hannes Reinecke wrote: >> >>> This patch make the tape always non-rewinding when SG_IO is used, thus >>> allowing udev to

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-02 Thread Kai Mäkisara (Kolumbus)
On 2.2.2014, at 13.42, Hannes Reinecke wrote: [part of explanation snipped from reply] > But we're now trying to deprecate the original (and unmaintained) > scsi_id program and replace it with the standard 'sg_inq' program. > Which is a standard program which just issues the respective SCSI com

Re: [PATCH] st: fix corruption of the st_modedef structures in st_set_options()

2014-02-12 Thread Kai Mäkisara (Kolumbus)
6d e8 4c 89 75 f0 4c 89 7d f8 66 66 66 66 90 <44> > 0f b7 bf 98 00 00 00 8b 05 71 6d 87 00 48 89 fb 49 89 f4 49 > [ 135.378282] RIP [] kernfs_find_ns+0x21/0x150 > [ 135.384355] RSP > [ 135.387881] CR2: 0098 > [ 135.391298] ---[ end trace 1968409221ddb3c8 ]---

Re: [PATCH]: add debug flag parameter for SCSI tape driver

2014-06-11 Thread Kai Mäkisara (Kolumbus)
On 11.6.2014, at 2.48, Laurence Oberman wrote: > Hello > > Take 2 of this patch, changed module description and subject line. > > This patch adds a debug_flag parameter that can be set on module load, and > allows the DEBUG facility without a module recompile. > Usage: mpdprobe st debug_flag=

Re: [PATCH 4/6] st: call scsi_set_medium_removal directly

2014-11-09 Thread Kai Mäkisara (Kolumbus)
> On 7.11.2014, at 1.54, Elliott, Robert (Server Storage) > wrote: > ... > 3. Reviewing the callers, st_release has an initialized > result variable but does nothing else with it but return it: > int result = 0; > ... > return result; > > It ignores the do_door_lock -> scsi_s

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

2015-02-05 Thread Kai Mäkisara (Kolumbus)
> On 2.2.2015, at 17.16, Laurence Oberman wrote: > > I pulled this this morning and will be testing. The prior version was > stable for me on the upstream and RHEL 6.5 kernel without exhaustive > testing. > We also just received more requests to get this into RHEL from HP / > Red Hat customers.

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

2015-02-05 Thread Kai Mäkisara (Kolumbus)
> On 5.2.2015, at 19.40, Laurence Oberman wrote: > > - Original Message - > From: "Kai Mäkisara (Kolumbus)" > To: "Laurence Oberman" > Cc: "Shane M Seymour" , lober...@redhat.com, > linux-scsi@vger.kernel.org, "James E.J. B

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

2015-02-08 Thread Kai Mäkisara (Kolumbus)
> On 8.2.2015, at 4.45, Greg KH wrote: > > On Sat, Feb 07, 2015 at 09:27:05PM -0500, Laurence Oberman wrote: >> Hello >> Its not going to be tens of thousands of devices. That count was an >> aggregate based on 1000's of servers. >> In reality its unlikely to ever be more than 100 tapes drives p

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

2015-02-09 Thread Kai Mäkisara (Kolumbus)
> On 9.2.2015, at 8.00, Seymour, Shane M wrote: > > Kai - see last 3 paragraphs for question about if something is a bug or not. > > BTW I had a look - I couldn't quickly find out if there was a way to tell if > the medium has changed in a tape drive (there could be something device > specifi

Re: [PATCH] st: fix blk_get_queue usage

2017-08-01 Thread Kai Mäkisara (Kolumbus)
>queue should be set only after a successful > blk_queue_get(). > > Signed-off-by: Bodo Stroesser > Acked-by: Shirish Pargaonkar > Signed-off-by: Hannes Reinecke Acked-by: Kai Mäkisara Thanks, Kai

Re: [PATCH 37/41] scsi: st: mark expected switch fall-throughs

2019-01-10 Thread Kai Mäkisara (Kolumbus)
> On 10 Jan 2019, at 21.56, Gustavo A. R. Silva wrote: > > Hi, > > Friendly ping (second one): > > Who can ack/review/take this patch, please? > Acked-by: Kai Mäkisara Thanks, Kai > Thanks > -- > Gustavo > > On 12/19/18 6:08 PM, Gustavo A.

Re: [RFC] Re: broken userland ABI in configfs binary attributes

2019-08-26 Thread Kai Mäkisara (Kolumbus)
> On 26 Aug 2019, at 19.29, Al Viro wrote: > > On Mon, Aug 26, 2019 at 03:48:38AM +0100, Al Viro wrote: > >> We might be able to paper over that mess by doing what /dev/st does - >> checking that file_count(file) == 1 in ->flush() instance and doing commit >> there in such case. It's no