From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: "cheater00 ." <cheater00@gmail.com>,
Hugo Mills <hugo@carfax.org.uk>,
Chris Murphy <lists@colorremedies.com>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: 6TB partition, Data only 2TB - aka When you haven't hit the "usual" problem
Date: Mon, 11 Jan 2016 08:05:55 -0500 [thread overview]
Message-ID: <5693A8B3.2090508@gmail.com> (raw)
In-Reply-To: <CA+9GZUg-F1PWSAvpwy3=D6tz1gNgK88nTYzUP32D_hbg0H=rYg@mail.gmail.com>
On 2016-01-09 16:07, cheater00 . wrote:
> Would like to point out that this can cause data loss. If I'm writing
> to disk and the disk becomes unexpectedly read only - that data will
> be lost, because who in their right mind makes their code expect this
> and builds a contingency (e.g. caching, backpressure, etc)...
If a data critical application (mail server, database server, anything
similar) can't gracefully handle ENOSPC, then that application is
broken, not the FS. As an example, set up a small VM with an SMTP
server, then force the FS the server uses for queuing mail read-only,
and see if you can submit mail, then go read the RFCs for SMTP and see
what clients are supposed to do when they can't submit mail. A properly
designed piece of software is supposed to be resilient against common
failure modes of the resources it depends on (which includes ENOSPC and
read-only filesystems for anything that works with data on disk).
>
> There's no loss of data on the disk because the data doesn't make it
> to disk in the first place. But it's exactly the same as if the data
> had been written to disk, and then lost.
>
No, it isn't. If you absolutely need the data on disk, you should be
calling fsync or fdatasync, and then assuming if those return an error
that none of the data written since the last call has gotten to the disk
(some of it might have, but you need to assume it hasn't). Every piece
of software in wide usage that requires data to be on the disk does
this, because otherwise it can't guarantee that the data is on disk.
next prev parent reply other threads:[~2016-01-11 13:06 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-30 21:44 6TB partition, Data only 2TB - aka When you haven't hit the "usual" problem cheater00 .
2015-12-30 22:13 ` Chris Murphy
2016-01-02 2:09 ` cheater00 .
2016-01-02 2:10 ` cheater00 .
[not found] ` <CA+9GZUiWQ2tAotFuq2Svkjnk+2Quz5B8UwZSSpm4SJfhqfoStQ@mail.gmail.com>
2016-01-07 21:55 ` Chris Murphy
[not found] ` <CA+9GZUjLcRnRX_mwO-McXWFd+G4o3jtBENMLnszg-rJTn6vL1w@mail.gmail.com>
[not found] ` <CAJCQCtRhYZi9nqWP_LYmZeg1yRQVkpnmUDQ-P5o1-gc-3w+Pdg@mail.gmail.com>
2016-01-09 20:00 ` cheater00 .
2016-01-09 20:26 ` Hugo Mills
2016-01-09 20:59 ` cheater00 .
2016-01-09 21:04 ` Hugo Mills
2016-01-09 21:07 ` cheater00 .
2016-01-09 21:15 ` Hugo Mills
2016-01-10 3:59 ` cheater00 .
2016-01-10 6:16 ` Russell Coker
2016-01-10 22:24 ` cheater00 .
2016-01-10 22:32 ` Lionel Bouton
2016-01-11 13:05 ` Austin S. Hemmelgarn [this message]
2016-01-11 13:11 ` cheater00 .
2016-01-11 13:30 ` cheater00 .
2016-01-11 13:45 ` cheater00 .
2016-01-11 14:04 ` cheater00 .
2016-01-12 2:18 ` Duncan
2016-08-04 16:53 ` Lutz Vieweg
2016-08-04 20:30 ` Chris Murphy
2016-08-05 10:56 ` Lutz Vieweg
2016-08-05 12:12 ` Austin S. Hemmelgarn
2016-08-05 13:14 ` Lutz Vieweg
2016-08-05 20:03 ` Gabriel C
2016-08-25 15:48 ` Lutz Vieweg
2016-01-11 14:10 ` Austin S. Hemmelgarn
2016-01-11 16:02 ` cheater00 .
2016-01-11 16:33 ` cheater00 .
2016-01-11 20:29 ` Henk Slager
2016-01-12 1:16 ` Duncan
2016-01-11 0:13 ` Chris Murphy
2016-01-11 9:03 ` Hugo Mills
2016-01-11 13:04 ` cheater00 .
2016-01-11 21:31 ` Chris Murphy
2016-01-11 22:10 ` Hugo Mills
2016-01-11 22:20 ` Chris Murphy
2016-01-11 22:30 ` Hugo Mills
2016-01-11 22:39 ` Chris Murphy
2016-01-11 23:07 ` Hugo Mills
2016-01-11 23:12 ` cheater00 .
2016-01-11 23:05 ` cheater00 .
2016-01-12 2:05 ` Duncan
2016-01-11 22:57 ` cheater00 .
2016-01-10 14:14 ` Henk Slager
2016-01-10 23:47 ` cheater00 .
2016-01-11 0:24 ` Chris Murphy
2016-01-11 6:07 ` cheater00 .
2016-01-11 6:24 ` cheater00 .
2016-01-11 7:54 ` cheater00 .
2016-01-12 0:35 ` Duncan
2016-01-11 19:50 ` Henk Slager
2016-01-11 23:03 ` cheater00 .
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=5693A8B3.2090508@gmail.com \
--to=ahferroin7@gmail.com \
--cc=cheater00@gmail.com \
--cc=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.