Linux-Block Archive on lore.kernel.org
 help / color / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: tasleson@redhat.com, linux-ide@vger.kernel.org,
	linux-scsi@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [RFC PATCH v3 5/8] ata_dev_printk: Use dev_printk
Date: Tue, 14 Jul 2020 10:17:50 +0200
Message-ID: <20200714081750.GB862637@kroah.com> (raw)
In-Reply-To: <cfff719b-dc12-a06a-d0ee-4165323171de@samsung.com>

On Tue, Jul 14, 2020 at 10:06:05AM +0200, Bartlomiej Zolnierkiewicz wrote:
> 
> Hi Tony,
> 
> On 7/9/20 11:18 PM, Tony Asleson wrote:
> > Hi Bartlomiej,
> > 
> > On 6/24/20 5:35 AM, Bartlomiej Zolnierkiewicz wrote:
> >> The root source of problem is that libata transport uses different
> >> naming scheme for ->tdev devices (please see dev_set_name() in
> >> ata_t{dev,link,port}_add()) than libata core for its logging
> >> functionality (ata_{dev,link,port}_printk()).
> >>
> >> Since libata transport is part of sysfs ABI we should be careful
> >> to not break it so one idea for solving the issue is to convert
> >> ata_t{dev,link,port}_add() to use libata logging naming scheme and
> >> at the same time add sysfs symlinks for the old libata transport
> >> naming scheme.

Given the age of the current implementation, what suddenly broke that
requires this to change at this point in time?

> > 
> > I tried doing as you suggested.  I've included what I've done so far.  I
> > haven't been able to get all the needed parts for the symlinks to
> > maintain compatibility.
> > 
> > The /sys/class/.. seems OK, eg.
> > 
> > $  ls -x -w 70 /sys/class/ata_[dl]*
> > /sys/class/ata_device:
> > ata1.00  ata2.00  ata3.00  ata4.00  ata5.00  ata6.00  ata7.00
> > ata7.01  ata8.00  ata8.01  dev1.0   dev2.0   dev3.0   dev4.0
> > dev5.0   dev6.0   dev7.0   dev7.1   dev8.0   dev8.1
> > 
> > /sys/class/ata_link:
> > ata1   ata2   ata3   ata4   ata5   ata6   ata7  ata8  link1  link2
> > link3  link4  link5  link6  link7  link8

A link class?  Ick ick ick.

> > but the implementation is a hack, see device.h, core.c changes.  There
> > must be a better way?
> > 
> > Also I'm missing part of the full path, eg.
> > 
> > /sys/devices/pci0000:00/0000:00:01.1/ata7/link7/dev7.0/ata_device/dev7.0/gscr
> > 
> > becomes
> > 
> > /sys/devices/pci0000:00/0000:00:01.1/ata7/ata7/ata7.01/ata_device/ata7.01/gscr
> > 
> > but the compatibility symlinks added only get me to
> > 
> > /sys/devices/pci0000:00/0000:00:01.1/ata7/link7/dev7.0/ata_device/
> > 
> > I haven't found the right spot to get the last symlink included.
> > 
> > If you or anyone else has suggestions to correct the incomplete symlink
> > and/or correct the implementation to set the
> > /sys/class/ata_device it would be greatly appreciated.

I can't understand what you are trying to do here.

What do you want to represent in sysfs with a symlink that you can't
just have in a single sysfs file like "name" or "new_name" or
"name_because_we_didnt_think_about_this_10_years_ago" that shows you the
other "name" that you are trying to look up here?

Why abuse symlinks like this at all?

And no, the device.h and core.c changes aren't ok :)

thanks,

greg k-h

  reply index

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 19:17 [RFC PATCH v3 0/8] Add persistent durable identifier to storage log messages Tony Asleson
2020-06-23 19:17 ` [RFC PATCH v3 1/8] struct device: Add function callback durable_name Tony Asleson
2020-06-23 19:17 ` [RFC PATCH v3 2/8] create_syslog_header: Add durable name Tony Asleson
2020-06-23 19:17 ` [RFC PATCH v3 3/8] print_req_error: Use dev_printk Tony Asleson
2020-06-23 19:17 ` [RFC PATCH v3 4/8] buffer_io_error: " Tony Asleson
2020-06-23 19:17 ` [RFC PATCH v3 5/8] ata_dev_printk: " Tony Asleson
     [not found]   ` <CGME20200624103532eucas1p2c0988207e4dfc2f992d309b75deac3ee@eucas1p2.samsung.com>
2020-06-24 10:35     ` Bartlomiej Zolnierkiewicz
2020-06-24 15:15       ` Tony Asleson
2020-06-26 12:45         ` Bartlomiej Zolnierkiewicz
2020-06-26 13:54           ` Tony Asleson
     [not found]       ` <7ed08b94-755f-baab-0555-b4e454405729@redhat.com>
2020-07-14  8:06         ` Bartlomiej Zolnierkiewicz
2020-07-14  8:17           ` Greg Kroah-Hartman [this message]
2020-07-14  8:50             ` Bartlomiej Zolnierkiewicz
2020-07-17 10:06               ` Greg Kroah-Hartman
2020-07-17 10:17                 ` Hannes Reinecke
2020-07-17 10:27                 ` Bartlomiej Zolnierkiewicz
2020-07-17 19:47                   ` Tony Asleson
2020-07-24  8:50                     ` Bartlomiej Zolnierkiewicz
2020-06-23 19:17 ` [RFC PATCH v3 6/8] scsi: Add durable_name for dev_printk Tony Asleson
2020-06-23 19:17 ` [RFC PATCH v3 7/8] nvme: Add durable name " Tony Asleson
2020-06-23 20:04   ` Chaitanya Kulkarni
2020-06-23 20:32     ` Tony Asleson
2020-06-23 19:17 ` [RFC PATCH v3 8/8] dev_vprintk_emit: Increase hdr size Tony Asleson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200714081750.GB862637@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tasleson@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org
	public-inbox-index linux-block

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git