From: Matthew Wilcox <willy@infradead.org>
To: Mike Marshall <hubcap@omnibond.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Mike Marshall <hubcapsc@gmail.com>
Subject: Re: [GIT PULL] orangefs pull request for 5.13
Date: Sun, 2 May 2021 23:58:54 +0100 [thread overview]
Message-ID: <20210502225854.GA1847222@casper.infradead.org> (raw)
In-Reply-To: <CAOg9mSQ-p8vJ6LbSeTeNUCfu-PsT2=iS2+Kab-LYCu9h6MUu2A@mail.gmail.com>
On Sun, May 02, 2021 at 04:45:19PM -0400, Mike Marshall wrote:
> orangefs: implement orangefs_readahead
>
> mm/readahead.c/read_pages was quite a bit different back
> when I put my open-coded readahead logic into orangefs_readpage.
> It seemed to work as designed then, it is a trainwreck now.
Hey Mike,
I happened to have a chance to look at orangefs_readahead today, and
I'd like to suggest a minor improvement.
It's possible for rac->file to be NULL if the caller doesn't have a
struct file. I think that only happens when filesystems call their own
readahead routine internally, but in case it might happen from generic
code in the future, I recommend you do something like ...
- struct file *file = rac->file;
- struct inode *inode = file->f_mapping->host;
+ struct inode *inode = rac->mapping->host;
...
- i_pages = &file->f_mapping->i_pages;
+ i_pages = &rac->mapping->i_pages;
...
- inode->i_size, NULL, NULL, file)) < 0)
+ inode->i_size, NULL, NULL, rac->file)) < 0)
(i have this change all tangled up with some other changes in my tree,
so no easy patch to apply, sorry)
next prev parent reply other threads:[~2021-05-02 22:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-02 20:45 [GIT PULL] orangefs pull request for 5.13 Mike Marshall
2021-05-02 21:37 ` pr-tracker-bot
2021-05-02 22:58 ` Matthew Wilcox [this message]
2021-05-03 15:43 ` Mike Marshall
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=20210502225854.GA1847222@casper.infradead.org \
--to=willy@infradead.org \
--cc=hubcap@omnibond.com \
--cc=hubcapsc@gmail.com \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).