From: Coly Li <email@example.com> To: Greg Kroah-Hartman <firstname.lastname@example.org> Cc: email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, Dan Williams <firstname.lastname@example.org>, Hannes Reinecke <email@example.com>, Jens Axboe <firstname.lastname@example.org>, NeilBrown <email@example.com>, Richard Fan <firstname.lastname@example.org>, Vishal L Verma <email@example.com>, firstname.lastname@example.org Subject: Re: Too large badblocks sysfs file (was: [PATCH v3 0/7] badblocks improvement for multiple bad block ranges) Date: Thu, 23 Sep 2021 14:14:12 +0800 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <YUwZ95Z+L5M3aZ9V@kroah.com> On 9/23/21 2:08 PM, Greg Kroah-Hartman wrote: > On Thu, Sep 23, 2021 at 01:59:28PM +0800, Coly Li wrote: >> Hi all the kernel gurus, and folks in mailing lists, >> >> This is a question about exporting 4KB+ text information via sysfs >> interface. I need advice on how to handle the problem. Hi Greg, This is the code in mainline kernel for quite long time. > Please do not do that. Seriously, that is not what sysfs is for, and is > an abuse of it. > > sysfs is for "one value per file" and should never even get close to a > 4kb limit. If it does, you are doing something really really wrong and > should just remove that sysfs file from the system and redesign your > api. I understand this. And what I addressed is the problem I need to fix. The code is there for almost 10 years, I just find it during my work on bad blocks API fixing. > >> Recently I work on the bad blocks API (block/badblocks.c) improvement, there >> is a sysfs file to export the bad block ranges for me raid. E.g for a md >> raid1 device, file >> /sys/block/md0/md/rd0/bad_blocks >> may contain the following text content, >> 64 32 >> 128 8 > Ick, again, that's not ok at all. sysfs files should never have to be > parsed like this. I cannot agree more with you. What I am asking for was ---- how to fix it ? Thanks. Coly Li
next prev parent reply other threads:[~2021-09-23 6:14 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-13 16:36 [PATCH v3 0/7] badblocks improvement for multiple bad block ranges Coly Li 2021-09-13 16:36 ` [PATCH v3 1/6] badblocks: add more helper structure and routines in badblocks.h Coly Li 2021-09-27 7:23 ` Geliang Tang 2021-09-27 8:23 ` Coly Li 2021-09-13 16:36 ` [PATCH v3 2/6] badblocks: add helper routines for badblock ranges handling Coly Li 2021-09-27 7:25 ` Geliang Tang 2021-09-27 8:17 ` Coly Li 2021-09-13 16:36 ` [PATCH v3 3/6] badblocks: improvement badblocks_set() for multiple " Coly Li 2021-09-27 7:30 ` Geliang Tang 2021-09-27 8:16 ` Coly Li 2021-09-13 16:36 ` [PATCH v3 4/6] badblocks: improve badblocks_clear() " Coly Li 2021-09-13 16:36 ` [PATCH v3 5/6] badblocks: improve badblocks_check() " Coly Li 2021-09-13 16:36 ` [PATCH v3 6/6] badblocks: switch to the improved badblock handling code Coly Li 2021-09-13 16:36 ` [PATCH] test: user space code to test badblocks APIs Coly Li 2021-09-23 5:59 ` Too large badblocks sysfs file (was: [PATCH v3 0/7] badblocks improvement for multiple bad block ranges) Coly Li 2021-09-23 6:08 ` Greg Kroah-Hartman 2021-09-23 6:14 ` Coly Li [this message] 2021-09-23 6:47 ` Greg Kroah-Hartman 2021-09-23 7:13 ` Coly Li 2021-09-23 9:40 ` Hannes Reinecke 2021-09-23 9:57 ` Greg Kroah-Hartman 2021-09-23 10:09 ` NeilBrown 2021-09-23 10:39 ` Greg Kroah-Hartman 2021-09-23 12:55 ` 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 \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: Too large badblocks sysfs file (was: [PATCH v3 0/7] badblocks improvement for multiple bad block ranges)' \ /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
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).