* [GIT PULL] Backing device changes for 3.20
@ 2015-02-12 20:38 Jens Axboe
2015-02-12 22:05 ` Linus Torvalds
0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2015-02-12 20:38 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
Hi Linus,
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.
Christoph did all the work here, I just fixed an oops with pages that
have a swap backing. Arnd fixed a missing export, and Oleg killed the
lustre backing_dev_info from staging. Last patch was from Al,
unexporting parts that are now no longer needed outside.
Please pull!
git://git.kernel.dk/linux-block.git for-3.20/bdi
for you to fetch changes up to 15d0f5ea348b9c4e6d41df294dde38a56a39c7bf:
Make super_blocks and sb_lock static (2015-02-02 10:07:59 -0700)
----------------------------------------------------------------
Al Viro (1):
Make super_blocks and sb_lock static
Arnd Bergmann (1):
mtd: export new mtd_mmap_capabilities
Christoph Hellwig (12):
fs: deduplicate noop_backing_dev_info
fs: kill BDI_CAP_SWAP_BACKED
fs: introduce f_op->mmap_capabilities for nommu mmap support
block_dev: only write bdev inode on close
block_dev: get bdev inode bdi directly from the block device
nilfs2: set up s_bdi like the generic mount_bdev code
fs: export inode_to_bdi and use it in favor of mapping->backing_dev_info
fs: remove mapping->backing_dev_info
ceph: remove call to bdi_unregister
nfs: don't call bdi_unregister
fs: don't reassign dirty inodes to default_backing_dev_info
fs: remove default_backing_dev_info
Jens Axboe (1):
fs: make inode_to_bdi() handle NULL inode
Oleg Drokin (1):
staging/lustre/llite: get rid of backing_dev_info
Documentation/nommu-mmap.txt | 8 +-
block/blk-core.c | 2 +-
drivers/char/mem.c | 64 +++++++-------
drivers/char/raw.c | 4 +-
drivers/mtd/mtdchar.c | 72 +++-------------
drivers/mtd/mtdconcat.c | 10 ---
drivers/mtd/mtdcore.c | 81 +++++-------------
drivers/mtd/mtdpart.c | 1 -
drivers/staging/lustre/lustre/llite/llite_lib.c | 6 +-
fs/9p/v9fs.c | 2 +-
fs/afs/volume.c | 2 +-
fs/aio.c | 13 ---
fs/block_dev.c | 37 +++-----
fs/btrfs/disk-io.c | 6 +-
fs/btrfs/file.c | 2 +-
fs/btrfs/inode.c | 6 --
fs/ceph/file.c | 2 +-
fs/ceph/inode.c | 2 -
fs/ceph/super.c | 20 ++---
fs/char_dev.c | 24 ------
fs/cifs/connect.c | 2 +-
fs/cifs/inode.c | 2 -
fs/coda/inode.c | 2 +-
fs/configfs/configfs_internal.h | 2 -
fs/configfs/inode.c | 17 ----
fs/configfs/mount.c | 11 +--
fs/ecryptfs/inode.c | 1 -
fs/ecryptfs/main.c | 2 +-
fs/exofs/inode.c | 2 -
fs/exofs/super.c | 2 +-
fs/ext2/ialloc.c | 2 +-
fs/ext4/super.c | 2 +-
fs/fs-writeback.c | 14 +++-
fs/fuse/file.c | 10 +--
fs/fuse/inode.c | 1 -
fs/gfs2/aops.c | 2 +-
fs/gfs2/glock.c | 1 -
fs/gfs2/ops_fstype.c | 1 -
fs/gfs2/super.c | 2 +-
fs/hugetlbfs/inode.c | 13 ---
fs/inode.c | 13 ---
fs/kernfs/inode.c | 13 ---
fs/kernfs/kernfs-internal.h | 1 -
fs/kernfs/mount.c | 1 -
fs/ncpfs/inode.c | 3 +-
fs/nfs/filelayout/filelayout.c | 2 +-
fs/nfs/inode.c | 1 -
fs/nfs/internal.h | 1 -
fs/nfs/nfs4super.c | 1 -
fs/nfs/super.c | 24 ++----
fs/nfs/write.c | 6 +-
fs/nilfs2/gcinode.c | 1 -
fs/nilfs2/mdt.c | 6 +-
fs/nilfs2/page.c | 4 +-
fs/nilfs2/page.h | 3 +-
fs/nilfs2/super.c | 6 +-
fs/ntfs/file.c | 3 +-
fs/ocfs2/dlmfs/dlmfs.c | 14 ----
fs/ocfs2/file.c | 2 +-
fs/ramfs/file-nommu.c | 7 ++
fs/ramfs/inode.c | 21 +----
fs/romfs/mmap-nommu.c | 10 +++
fs/romfs/super.c | 3 -
fs/super.c | 12 +--
fs/ubifs/dir.c | 2 -
fs/ubifs/super.c | 5 +-
fs/xfs/xfs_file.c | 2 +-
include/linux/backing-dev.h | 53 ++----------
include/linux/cdev.h | 2 -
include/linux/fs.h | 28 ++++++-
include/linux/mtd/mtd.h | 2 +
include/trace/events/writeback.h | 12 ++-
mm/backing-dev.c | 107 ++++++------------------
mm/fadvise.c | 4 +-
mm/filemap.c | 4 +-
mm/filemap_xip.c | 3 +-
mm/madvise.c | 17 ++--
mm/nommu.c | 69 +++++++--------
mm/page-writeback.c | 29 +++----
mm/readahead.c | 4 +-
mm/shmem.c | 24 ++----
mm/swap.c | 2 -
mm/swap_state.c | 6 --
mm/truncate.c | 2 +-
mm/vmscan.c | 4 +-
security/security.c | 13 ++-
86 files changed, 304 insertions(+), 703 deletions(-)
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [GIT PULL] Backing device changes for 3.20 2015-02-12 20:38 [GIT PULL] Backing device changes for 3.20 Jens Axboe @ 2015-02-12 22:05 ` Linus Torvalds 2015-02-12 22:37 ` Stephen Rothwell 2015-02-12 23:53 ` Tom Haynes 0 siblings, 2 replies; 4+ messages in thread From: Linus Torvalds @ 2015-02-12 22:05 UTC (permalink / raw) To: Jens Axboe, Trond Myklebust Cc: Linux Kernel Mailing List, Linux NFS Mailing List 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. 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? Hmm? Linus ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] Backing device changes for 3.20 2015-02-12 22:05 ` Linus Torvalds @ 2015-02-12 22:37 ` Stephen Rothwell 2015-02-12 23:53 ` Tom Haynes 1 sibling, 0 replies; 4+ 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] 4+ messages in thread
* Re: [GIT PULL] Backing device changes for 3.20 2015-02-12 22:05 ` Linus Torvalds 2015-02-12 22:37 ` Stephen Rothwell @ 2015-02-12 23:53 ` Tom Haynes 1 sibling, 0 replies; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2015-02-12 23:54 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-02-12 20:38 [GIT PULL] Backing device changes for 3.20 Jens Axboe 2015-02-12 22:05 ` Linus Torvalds 2015-02-12 22:37 ` Stephen Rothwell 2015-02-12 23:53 ` Tom Haynes
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox