linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Need part_in_flight() to be non-static
@ 2020-05-08  6:41 Coly Li
  2020-05-08  6:45 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Coly Li @ 2020-05-08  6:41 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block

Hi Christoph,

I have a Memblaze Gen2 PCIe SSD card (quite old), whose driver source
code references part_in_flight(), but recently I find the code does not
compile because this function is static in 5.7-rc1 by following change,

commit 6005771c17db56b6a9acc12bd084134191560e18
Author: Christoph Hellwig <hch@lst.de>
Date:   Wed Mar 25 16:48:36 2020 +0100

    block: mark part_in_flight and part_in_flight_rw static

    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

The driver is open source, but not merged upstream and out of
maintenance now. Memblaze lent them to me for years, I just update the
kabi part to make it just work, and use them to test upstream md and
bcache code time to time.

The code piece where part_in_flight() is referenced is,

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
inline void part_round_stats_single(int cpu, struct hd_struct
*part,unsigned long now)
{
        if (now == part->stamp)
                return;

        if (part_in_flight(part)) {
                __part_stat_add(cpu, part, time_in_queue,
                                part_in_flight(part) * (now - part->stamp));
                __part_stat_add(cpu, part, io_ticks, (now - part->stamp));
        }
        part->stamp = now;
}

Is is possible to convert part_in_flight() to be non-static back ? If it
is not possible, is there any other routines I can use to make
part_round_stats_single() working ?

Thanks.

Coly Li

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Need part_in_flight() to be non-static
  2020-05-08  6:41 Need part_in_flight() to be non-static Coly Li
@ 2020-05-08  6:45 ` Christoph Hellwig
  2020-05-08  6:49   ` Coly Li
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2020-05-08  6:45 UTC (permalink / raw)
  To: Coly Li; +Cc: Christoph Hellwig, linux-block

On Fri, May 08, 2020 at 02:41:23PM +0800, Coly Li wrote:
> Is is possible to convert part_in_flight() to be non-static back ? If it
> is not possible, is there any other routines I can use to make
> part_round_stats_single() working ?

No.  Convert the driver to blk-mq and submit it upstream if you care
enough.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Need part_in_flight() to be non-static
  2020-05-08  6:45 ` Christoph Hellwig
@ 2020-05-08  6:49   ` Coly Li
  0 siblings, 0 replies; 3+ messages in thread
From: Coly Li @ 2020-05-08  6:49 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block

On 2020/5/8 14:45, Christoph Hellwig wrote:
> On Fri, May 08, 2020 at 02:41:23PM +0800, Coly Li wrote:
>> Is is possible to convert part_in_flight() to be non-static back ? If it
>> is not possible, is there any other routines I can use to make
>> part_round_stats_single() working ?
> 
> No.  Convert the driver to blk-mq and submit it upstream if you care
> enough.
> 

I see... Thanks you for the hint.

Coly Li

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-08  6:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  6:41 Need part_in_flight() to be non-static Coly Li
2020-05-08  6:45 ` Christoph Hellwig
2020-05-08  6:49   ` Coly Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).