From: Al Viro <viro@zeniv.linux.org.uk>
To: "\"Kai Mäkisara (Kolumbus)\"" <kai.makisara@kolumbus.fi>
Cc: Christoph Hellwig <hch@lst.de>,
linux-fsdevel@vger.kernel.org,
Octavian Purdila <octavian.purdila@intel.com>,
Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-scsi@vger.kernel.org
Subject: Re: [RFC] Re: broken userland ABI in configfs binary attributes
Date: Mon, 26 Aug 2019 20:32:10 +0100 [thread overview]
Message-ID: <20190826193210.GP1131@ZenIV.linux.org.uk> (raw)
In-Reply-To: <B35B5EA9-939C-49F5-BF65-491D70BCA8D4@kolumbus.fi>
On Mon, Aug 26, 2019 at 09:34:37PM +0300, "Kai Mäkisara (Kolumbus)" wrote:
>
>
> > On 26 Aug 2019, at 19.29, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > On Mon, Aug 26, 2019 at 03:48:38AM +0100, Al Viro wrote:
> >
> >> We might be able to paper over that mess by doing what /dev/st does -
> >> checking that file_count(file) == 1 in ->flush() instance and doing commit
> >> there in such case. It's not entirely reliable, though, and it's definitely
> >> not something I'd like to see spreading.
> >
> > This "not entirely reliable" turns out to be an understatement.
> > If you have /proc/*/fdinfo/* being read from at the time of final close(2),
> > you'll get file_count(file) > 1 the last time ->flush() is called. In other
> > words, we'd get the data not committed at all.
> >
> ...
> > PS: just dropping the check in st_flush() is probably a bad idea -
> > as it is, it can't overlap with st_write() and after such change it
> > will…
> Yes, don’t just drop it. The tape semantics require that a file mark is written when the last opener closes this sequential device. This is why the check is there. Of course, it is good if someone finds a better solution for this.
D'oh... OK, that settles it; exclusion with st_write() would've been
painful, but playing with the next st_write() on the same struct file
rewinding the damn thing to overwrite what st_flush() had spewed is
an obvious no-go.
next prev parent reply other threads:[~2019-08-26 19:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 2:48 broken userland ABI in configfs binary attributes Al Viro
2019-08-26 16:29 ` [RFC] " Al Viro
2019-08-26 18:20 ` Matthew Wilcox
2019-08-26 19:28 ` Al Viro
2019-08-27 8:51 ` Miklos Szeredi
2019-08-27 11:58 ` Al Viro
2019-08-27 12:21 ` Miklos Szeredi
2019-08-27 12:53 ` Al Viro
2019-08-31 8:32 ` Christoph Hellwig
2019-08-31 13:35 ` Al Viro
2019-08-31 14:44 ` Christoph Hellwig
2019-08-31 15:58 ` Al Viro
2019-08-26 18:34 ` "Kai Mäkisara (Kolumbus)"
2019-08-26 19:32 ` Al Viro [this message]
2019-08-27 15:01 ` Boaz Harrosh
2019-08-27 17:27 ` Al Viro
2019-08-27 17:59 ` Boaz Harrosh
2019-08-29 22:22 ` Al Viro
2019-08-29 23:32 ` Al Viro
2019-08-30 4:10 ` Dave Chinner
2019-08-30 4:44 ` Al Viro
2019-08-31 8:28 ` Christoph Hellwig
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=20190826193210.GP1131@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=hch@lst.de \
--cc=kai.makisara@kolumbus.fi \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--cc=pantelis.antoniou@konsulko.com \
--cc=torvalds@linux-foundation.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 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.