From: Anton Suvorov <warwish@yandex-team.ru>
To: willy@infradead.org
Cc: dmtrmonakhov@yandex-team.ru, linux-block@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
viro@zeniv.linux.org.uk, warwish@yandex-team.ru
Subject: [PATCH v2 01/10] drbd: reduce stack footprint in drbd_report_io_error()
Date: Tue, 22 Jun 2021 20:44:15 +0300 [thread overview]
Message-ID: <20210622174424.136960-2-warwish@yandex-team.ru> (raw)
In-Reply-To: <20210622174424.136960-1-warwish@yandex-team.ru>
Stack usage reduced (measured with allyesconfig):
./drivers/block/drbd/drbd_req.c drbd_report_io_error 200 72 -128
Signed-off-by: Anton Suvorov <warwish@yandex-team.ru>
---
drivers/block/drbd/drbd_req.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 13beb98a7c5a..bd7265edf614 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -510,16 +510,14 @@ static void mod_rq_state(struct drbd_request *req, struct bio_and_error *m,
static void drbd_report_io_error(struct drbd_device *device, struct drbd_request *req)
{
- char b[BDEVNAME_SIZE];
-
if (!__ratelimit(&drbd_ratelimit_state))
return;
- drbd_warn(device, "local %s IO error sector %llu+%u on %s\n",
- (req->rq_state & RQ_WRITE) ? "WRITE" : "READ",
- (unsigned long long)req->i.sector,
- req->i.size >> 9,
- bdevname(device->ldev->backing_bdev, b));
+ drbd_warn(device, "local %s IO error sector %llu+%u on %pg\n",
+ (req->rq_state & RQ_WRITE) ? "WRITE" : "READ",
+ (unsigned long long)req->i.sector,
+ req->i.size >> 9,
+ device->ldev->backing_bdev);
}
/* Helper for HANDED_OVER_TO_NETWORK.
--
2.25.1
next prev parent reply other threads:[~2021-06-22 17:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 15:28 [PATCH 00/10] reduce stack footprint printing bdev names Anton Suvorov
2021-06-02 15:28 ` [PATCH 01/10] drbd: reduce stack footprint in drbd_report_io_error() Anton Suvorov
2021-06-02 15:28 ` [PATCH 02/10] dax: reduce stack footprint dealing with block device names Anton Suvorov
2021-06-02 17:18 ` Matthew Wilcox
2021-06-22 17:44 ` [PATCH v2 00/10] reduce stack footprint printing bdev names Anton Suvorov
2021-06-22 17:44 ` Anton Suvorov [this message]
2021-06-22 17:44 ` [PATCH v2 02/10] dax: reduce stack footprint dealing with block device names Anton Suvorov
2021-06-22 17:44 ` [PATCH v2 03/10] raid-md: " Anton Suvorov
2021-06-23 8:26 ` Guoqing Jiang
2021-06-22 17:44 ` [PATCH v2 04/10] dm: " Anton Suvorov
2021-06-22 17:44 ` [PATCH v2 05/10] block: " Anton Suvorov
2021-06-23 7:45 ` Christoph Hellwig
2021-06-22 17:44 ` [PATCH v2 06/10] target: reduce stack footprint in iblock_show_configfs_dev_params() Anton Suvorov
2021-06-22 17:44 ` [PATCH v2 07/10] vfs: reduce stack footprint in __blkdev_put() Anton Suvorov
2021-06-22 17:44 ` [PATCH v2 08/10] ext4: reduce stack footprint in ext4_end_bio() Anton Suvorov
2021-06-22 17:44 ` [PATCH v2 09/10] security: reduce stack footprint in loadpin_read_file() Anton Suvorov
2021-06-22 17:45 ` [PATCH v2 10/10] block: remove unused symbol bio_devname() Anton Suvorov
2021-06-02 15:28 ` [PATCH 03/10] raid-md: reduce stack footprint dealing with block device names Anton Suvorov
2021-06-02 15:28 ` [PATCH 04/10] dm: " Anton Suvorov
2021-06-23 20:20 ` Mike Snitzer
2021-06-02 15:28 ` [PATCH 05/10] block: " Anton Suvorov
2021-06-02 15:28 ` [PATCH 06/10] target: reduce stack footprint in iblock_show_configfs_dev_params() Anton Suvorov
2021-06-02 15:29 ` [PATCH 07/10] vfs: reduce stack footprint in __blkdev_put() Anton Suvorov
2021-06-02 15:29 ` [PATCH 08/10] ext4: reduce stack footprint in ext4_end_bio() Anton Suvorov
2021-06-02 15:29 ` [PATCH 09/10] security: reduce stack footprint in loadpin_read_file() Anton Suvorov
2021-06-02 15:29 ` [PATCH 10/10] block: remove unused symbol bio_devname() Anton Suvorov
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=20210622174424.136960-2-warwish@yandex-team.ru \
--to=warwish@yandex-team.ru \
--cc=dmtrmonakhov@yandex-team.ru \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).