public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: allow readdir()'s of large empty directories to be interrupted
Date: Fri, 15 Apr 2016 10:56:22 -0400	[thread overview]
Message-ID: <20160415145622.GA11838@thunk.org> (raw)
In-Reply-To: <CA+55aFw63jj-PJ2c=aYZivkfHfei=1W2z72qs0P+aj-f0J1UKw@mail.gmail.com>

On Thu, Apr 14, 2016 at 07:01:14PM -0700, Linus Torvalds wrote:
> On Thu, Apr 14, 2016 at 1:37 PM, Theodore Ts'o <tytso@mit.edu> wrote:
> >
> >  So Linus's proposal to
> > add "if (signal_pending(current)) return -EINTR;" to filldir64() would
> > probably cause more than a few userspace regressions.
> 
> I don't think you actually read or understood my proposal.
> 
> The proposal added it to inside the if-statement in
> 
>         dirent = buf->previous;
>         if (dirent) {
> +               if (signal_pending(current)) return -EINTR;
> 
> and that actually guarantees that readdir() _never_ returns -EINTR,
> because there is at least one entry that got filled out (the previous
> one filled in, now pointed to be "dirent").

Sorry, yes I didn't understand that was what you were getting at.
That makes a lot of sense.  Thanks!!

					- Ted

      reply	other threads:[~2016-04-15 14:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 20:37 [PATCH] ext4: allow readdir()'s of large empty directories to be interrupted Theodore Ts'o
2016-04-15  2:01 ` Linus Torvalds
2016-04-15 14:56   ` Theodore Ts'o [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=20160415145622.GA11838@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox