Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dc51b82 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull more vfs updates from Al Viro:
 "Assorted VFS fixes and related cleanups (IMO the most interesting in
  that part are f_path-related things and Eric's descriptor-related
  stuff).  UFS regression fixes (it got broken last cycle).  9P fixes.
  fs-cache series, DAX patches, Jan's file_remove_suid() work"

[ I'd say this is much more than "fixes and related cleanups".  The
  file_table locking rule change by Eric Dumazet is a rather big and
  fundamental update even if the patch isn't huge.   - Linus ]

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (49 commits)
  9p: cope with bogus responses from server in p9_client_{read,write}
  p9_client_write(): avoid double p9_free_req()
  9p: forgetting to cancel request on interrupted zero-copy RPC
  dax: bdev_direct_access() may sleep
  block: Add support for DAX reads/writes to block devices
  dax: Use copy_from_iter_nocache
  dax: Add block size note to documentation
  fs/file.c: __fget() and dup2() atomicity rules
  fs/file.c: don't acquire files->file_lock in fd_install()
  fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation
  vfs: avoid creation of inode number 0 in get_next_ino
  namei: make set_root_rcu() return void
  make simple_positive() public
  ufs: use dir_pages instead of ufs_dir_pages()
  pagemap.h: move dir_pages() over there
  remove the pointless include of lglock.h
  fs: cleanup slight list_entry abuse
  xfs: Correctly lock inode when removing suid and file capabilities
  fs: Call security_ops->inode_killpriv on truncate
  fs: Provide function telling whether file_remove_privs() will do anything
  ...
parents 9b284cbd 0f1db7de
Loading
Loading
Loading
Loading
+23 −0
Original line number Original line Diff line number Diff line
@@ -676,6 +676,29 @@ FS-Cache provides some utilities that a cache backend may make use of:
     as possible.
     as possible.




 (*) Indicate that a stale object was found and discarded:

	void fscache_object_retrying_stale(struct fscache_object *object);

     This is called to indicate that the lookup procedure found an object in
     the cache that the netfs decided was stale.  The object has been
     discarded from the cache and the lookup will be performed again.


 (*) Indicate that the caching backend killed an object:

	void fscache_object_mark_killed(struct fscache_object *object,
					enum fscache_why_object_killed why);

     This is called to indicate that the cache backend preemptively killed an
     object.  The why parameter should be set to indicate the reason:

	FSCACHE_OBJECT_IS_STALE - the object was stale and needs discarding.
	FSCACHE_OBJECT_NO_SPACE - there was insufficient cache space
	FSCACHE_OBJECT_WAS_RETIRED - the object was retired when relinquished.
	FSCACHE_OBJECT_WAS_CULLED - the object was culled to make space.


 (*) Get and release references on a retrieval record:
 (*) Get and release references on a retrieval record:


	void fscache_get_retrieval(struct fscache_retrieval *op);
	void fscache_get_retrieval(struct fscache_retrieval *op);
+6 −1
Original line number Original line Diff line number Diff line
@@ -284,8 +284,9 @@ proc files.
		enq=N	Number of times async ops queued for processing
		enq=N	Number of times async ops queued for processing
		can=N	Number of async ops cancelled
		can=N	Number of async ops cancelled
		rej=N	Number of async ops rejected due to object lookup/create failure
		rej=N	Number of async ops rejected due to object lookup/create failure
		ini=N	Number of async ops initialised
		dfr=N	Number of async ops queued for deferred release
		dfr=N	Number of async ops queued for deferred release
		rel=N	Number of async ops released
		rel=N	Number of async ops released (should equal ini=N when idle)
		gc=N	Number of deferred-release async ops garbage collected
		gc=N	Number of deferred-release async ops garbage collected
	CacheOp	alo=N	Number of in-progress alloc_object() cache ops
	CacheOp	alo=N	Number of in-progress alloc_object() cache ops
		luo=N	Number of in-progress lookup_object() cache ops
		luo=N	Number of in-progress lookup_object() cache ops
@@ -303,6 +304,10 @@ proc files.
		wrp=N	Number of in-progress write_page() cache ops
		wrp=N	Number of in-progress write_page() cache ops
		ucp=N	Number of in-progress uncache_page() cache ops
		ucp=N	Number of in-progress uncache_page() cache ops
		dsp=N	Number of in-progress dissociate_pages() cache ops
		dsp=N	Number of in-progress dissociate_pages() cache ops
	CacheEv	nsp=N	Number of object lookups/creations rejected due to lack of space
		stl=N	Number of stale objects deleted
		rtr=N	Number of objects retired when relinquished
		cul=N	Number of objects culled




 (*) /proc/fs/fscache/histogram
 (*) /proc/fs/fscache/histogram
+4 −2
Original line number Original line Diff line number Diff line
@@ -18,8 +18,10 @@ Usage
-----
-----


If you have a block device which supports DAX, you can make a filesystem
If you have a block device which supports DAX, you can make a filesystem
on it as usual.  When mounting it, use the -o dax option manually
on it as usual.  The DAX code currently only supports files with a block
or add 'dax' to the options in /etc/fstab.
size equal to your kernel's PAGE_SIZE, so you may need to specify a block
size when creating the filesystem.  When mounting it, use the "-o dax"
option on the command line or add 'dax' to the options in /etc/fstab.




Implementation Tips for Block Driver Writers
Implementation Tips for Block Driver Writers
+4 −0
Original line number Original line Diff line number Diff line
@@ -500,3 +500,7 @@ in your dentry operations instead.
	dentry,  it does not get nameidata at all and it gets called only when cookie
	dentry,  it does not get nameidata at all and it gets called only when cookie
	is non-NULL.  Note that link body isn't available anymore, so if you need it,
	is non-NULL.  Note that link body isn't available anymore, so if you need it,
	store it as cookie.
	store it as cookie.
--
[mandatory]
	__fd_install() & fd_install() can now sleep. Callers should not
	hold a spinlock	or other resources that do not allow a schedule.
+3 −7
Original line number Original line Diff line number Diff line
@@ -71,15 +71,12 @@ static void print_task_path_n_nm(struct task_struct *tsk, char *buf)
	mmput(mm);
	mmput(mm);


	if (exe_file) {
	if (exe_file) {
		path = exe_file->f_path;
		path_nm = file_path(exe_file, buf, 255);
		path_get(&exe_file->f_path);
		fput(exe_file);
		fput(exe_file);
		path_nm = d_path(&path, buf, 255);
		path_put(&path);
	}
	}


done:
done:
	pr_info("Path: %s\n", path_nm);
	pr_info("Path: %s\n", !IS_ERR(path_nm) ? path_nm : "?");
}
}


static void show_faulting_vma(unsigned long address, char *buf)
static void show_faulting_vma(unsigned long address, char *buf)
@@ -103,8 +100,7 @@ static void show_faulting_vma(unsigned long address, char *buf)
	if (vma && (vma->vm_start <= address)) {
	if (vma && (vma->vm_start <= address)) {
		struct file *file = vma->vm_file;
		struct file *file = vma->vm_file;
		if (file) {
		if (file) {
			struct path *path = &file->f_path;
			nm = file_path(file, buf, PAGE_SIZE - 1);
			nm = d_path(path, buf, PAGE_SIZE - 1);
			inode = file_inode(vma->vm_file);
			inode = file_inode(vma->vm_file);
			dev = inode->i_sb->s_dev;
			dev = inode->i_sb->s_dev;
			ino = inode->i_ino;
			ino = inode->i_ino;
Loading