On Thu, 10 Sep 2020 at 13:28, Christoph Hellwig <hch@xxxxxx> wrote: > > On Thu, Sep 10, 2020 at 09:59:05AM +0800, Tom Yan wrote: > > If we rename it to e.g. SG_GET_MAX_XFER_BYTES, it will still break > > applications unless we also keep the wrong/ugly/confusing name (and > > you lose the advantage/generality that the two ioctls can be used on > > both sg and "pure" block devices; which seems to be the case of some > > SG_* ioctls as well). > > How is that an advantage? Applications that works with block devices > don't really work with a magic passthrough character device. You must assume that there are applications already assuming that work. (And it will, at least in some cases, if this series get merged.) And you have not been giving me a solid point anyway, as I said, it's just queue_*() at the end of the day; regardless of whether those would work in all sg cases, we have been using them in the sg driver anyway. And it's not like we have to guarantee that (the) ioctls can work in every case anyway, right? (Especially when they aren't named SG_*). I mean, what's even your point? How do you propose we fix this? Should we just leave it broken/wrong/rotten as-is (including the case that you don't consider it being so)? If that's what you are trying to say then please just say it, I'll just walk away quietly. I'm really kind of done with this sort of looping that leads to nowhere. > > > I don't really care enough though. I mean, I'm okay with > > SG_GET_MAX_XFER_BYTES *and* NO "improper" BLKSECTGET. If that will get > > the patch series in, I am willing to send a new version. If not, I'm > > just gonna drop this. > > You must assume that there are applications already that depend in the > "weird" BLKSECTGET on sg, given that it has been around so long. Any > change to the semantics will break them. While you forgot to assume that there are applications assuming BLKSECTGET is as "weird" in the block layer at the same time. (That's exactly what has happened in qemu.) You don't get the slightest advantage in "trying not to break things" by doing the wrong thing. It only goes on making more things broken.