Linux block layer
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org
Subject: Need part_in_flight() to be non-static
Date: Fri, 8 May 2020 14:41:23 +0800	[thread overview]
Message-ID: <005a742e-380e-da51-d17e-072221871330@suse.de> (raw)

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

             reply	other threads:[~2020-05-08  6:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  6:41 Coly Li [this message]
2020-05-08  6:45 ` Need part_in_flight() to be non-static Christoph Hellwig
2020-05-08  6:49   ` Coly Li

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=005a742e-380e-da51-d17e-072221871330@suse.de \
    --to=colyli@suse.de \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox