Message ID | CAOg9mSQ-p8vJ6LbSeTeNUCfu-PsT2=iS2+Kab-LYCu9h6MUu2A@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [GIT,PULL] orangefs pull request for 5.13 | expand |
The pull request you sent on Sun, 2 May 2021 16:45:19 -0400:
> git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git tags/for-linus-5.13-ofs-1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/9ccce092fc64d19504fa54de4fd659e279cc92e7
Thank you!
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)
Thanks Matthew... I added in your changes to "the current linus tree" and ran the whole thing through xfstests with my fingers crossed. It didn't fix any regressions :-) but I'll send it in as a patch. -Mike On Sun, May 2, 2021 at 6:59 PM Matthew Wilcox <willy@infradead.org> wrote: > > 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)