From: Goswin von Brederlow <goswin-v-b@web.de>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: References to unmapped sectors
Date: Sat, 07 Feb 2009 14:41:44 +0100 [thread overview]
Message-ID: <87mycyictj.fsf@frosties.localdomain> (raw)
In-Reply-To: <87f94c370902051458t714822cbj84011446c24ec3dc@mail.gmail.com> (Greg Freemyer's message of "Thu, 5 Feb 2009 17:58:03 -0500")
Greg Freemyer <greg.freemyer@gmail.com> writes:
> I just have a very fundamental issue with a storage spec that allows
> random garbage to be returned in response to a read request with no
> signaling mechanism included to notify the kernel that it is reading
> trash. Ric has told me that in the real world, storage vendors are
> likely to return a well defined pattern (nulls, etc.) in response to
> reads of these unmapped sectors. If true, why not have the spec say
> so.
More flexibility for implementations. It means implementations do not
have to check for the validity of read requests. This can sometimes
speed up things, save (non volatile) memory, save disk syncs, save
global locks for mapping updates, ...
Imagine if the C standard would require that accessing a invalid
pointer would abort the program. Suddenly every pointer access would
have to be validated in case the pointer is invalid but accidentally
points to some (for the cpu) valid address.
> Or have some way to communicate to the kernel which sectors are
> reliable (mapped) vs. unreliable (unmapped).
>
> On the one hand the whole purpose of the SCSI DIF/DIX extension is to
> ensure that the data being read from a scsi device is the exact data
> that was written, but the thin-provisioning specs go in the opposite
> direction and allow complete garbage to be returned with no signaling
> mechanism to allow the kernel to even conceivably find out.
>
> Instead of focusing on the negative, I'll reword my issue to discuss
> how unmapped sector knowledge (if available) could be used to
> _improve_ the current functionality of a filesystem:
>
> ==> Positive spin on how knowledge of which sectors are unmapped could
> improve filesystem reliability
Isn't it more advantageous for wear leveling? The more unused blocks a
device has the better it can level wear and thereby extend the
lifetime of the device.
> The original email discussed pointers that in someway became corrupted
> to point at blocks which NEVER contained valid data. Since the data
> is outside of the overall range of data blocks, it can be identified
> and both the kernel and userspace can be prevented from relying on
> what would obviously be trash.
>
> Whatever mechanism caused the bmap pointers to point outside the
> overall range of the filesystem, I assume could just as easily cause
> the those pointers to point at unmapped sectors.
>
> If the SCSI / ATA specs were enhanced to somehow notify the kernel
> when a read of these unmapped sectors occurred, then both the kernel
> and userspace could be protected from relying on this potential trash
> as well.
At least there should be a scsi reply for this. The use of which could
still be optional. So either an error or any data could be
valid. Obviously requiring a proper error would be better for the
user.
> FYI: I've tried to find a way to send my comments to the T10
> committee, but I have not found a way to do that since the spec is not
> in a "public comment" period at present.
>
> Greg
MfG
Goswin
prev parent reply other threads:[~2009-02-07 13:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 22:58 References to unmapped sectors [Was: [RFC] ext4_bmap() may return blocks outside filesystem] Greg Freemyer
2009-02-07 13:41 ` Goswin von Brederlow [this message]
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=87mycyictj.fsf@frosties.localdomain \
--to=goswin-v-b@web.de \
--cc=linux-ext4@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