* Re: [GIT PULL] Backing device changes for 3.20
2015-02-12 22:05 ` [GIT PULL] Backing device changes for 3.20 Linus Torvalds
@ 2015-02-12 22:37 ` Stephen Rothwell
2015-02-12 23:53 ` Tom Haynes
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2015-02-12 22:37 UTC (permalink / raw)
To: Linus Torvalds
Cc: Jens Axboe, Trond Myklebust, Linux Kernel Mailing List,
Linux NFS Mailing List
[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]
Hi All,
On Thu, 12 Feb 2015 14:05:00 -0800 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> On Thu, Feb 12, 2015 at 12:38 PM, Jens Axboe <axboe@fb.com> wrote:
> >
> > This pull request contains a cleanup of how the backing device is
> > handled, in preparation for a rework of the life time rules. In this
> > part, the most important change is to split the unrelated nommu mmap
> > flags from it, but also removing a backing_dev_info pointer from the
> > address_space (and inode), and a cleanup of other various minor bits.
>
> Ugh, so this has a semantic conflict with the NFS client, that has
> this particular code:
>
> if (!cinfo->dreq) {
> inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
> - inc_bdi_stat(page_file_mapping(req->wb_page)->backing_dev_info,
> +
> inc_bdi_stat(inode_to_bdi(page_file_mapping(req->wb_page)->host),
> BDI_RECLAIMABLE);
> __mark_inode_dirty(req->wb_context->dentry->d_inode,
> I_DIRTY_DATASYNC);
> }
>
> duplicated several times, and now one more time in the new
> fs/nfs/flexfilelayout/flexfilelayout.c file.
Sometime I wonder why I bother pointing these things out in
linux-next :-( Ah, well.
(Trond did mention it in his pull request, but it wasn't a problem
then.)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [GIT PULL] Backing device changes for 3.20
2015-02-12 22:05 ` [GIT PULL] Backing device changes for 3.20 Linus Torvalds
2015-02-12 22:37 ` Stephen Rothwell
@ 2015-02-12 23:53 ` Tom Haynes
1 sibling, 0 replies; 3+ messages in thread
From: Tom Haynes @ 2015-02-12 23:53 UTC (permalink / raw)
To: Linus Torvalds
Cc: Jens Axboe, Trond Myklebust, Linux Kernel Mailing List,
Linux NFS Mailing List
On Thu, Feb 12, 2015 at 02:05:00PM -0800, Linus Torvalds wrote:
> On Thu, Feb 12, 2015 at 12:38 PM, Jens Axboe <axboe@fb.com> wrote:
> >
> > This pull request contains a cleanup of how the backing device is
> > handled, in preparation for a rework of the life time rules. In this
> > part, the most important change is to split the unrelated nommu mmap
> > flags from it, but also removing a backing_dev_info pointer from the
> > address_space (and inode), and a cleanup of other various minor bits.
>
> Ugh, so this has a semantic conflict with the NFS client, that has
> this particular code:
>
> if (!cinfo->dreq) {
> inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
> - inc_bdi_stat(page_file_mapping(req->wb_page)->backing_dev_info,
> +
> inc_bdi_stat(inode_to_bdi(page_file_mapping(req->wb_page)->host),
> BDI_RECLAIMABLE);
> __mark_inode_dirty(req->wb_context->dentry->d_inode,
> I_DIRTY_DATASYNC);
> }
>
> duplicated several times, and now one more time in the new
> fs/nfs/flexfilelayout/flexfilelayout.c file.
>
> I fixed it the same way it was fixed everywhere else, but while fixing
> and looking at the cases, I *really* feel like the nfs code needs some
> cleaning up.
>
> That insane complicated and unexplained code exists three times: in
> filelayout/filelayout.c, flexfilelayout/flexfilelayout.c and in
> write.c.
>
> The "reverse" case (which does the decrements, and doesn't mark the
> inode dirty) exists a few more times.
>
> Could we make that a helper function, with a few comments.
Yes, I'll make a helper function.
And for the "reverse" case, the second instance can actually call
nfs_clear_page_commit().
> For example, looking at it, I wonder if
>
> - page_file_mapping(req->wb_page)->host
> - req->wb_context->dentry->d_inode
>
> are the same inode?
Will resolve...
>
> Hmm?
>
> Linus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread