Al Viro | 24 Apr 22:40 2015
Picon

[git pull] vfs.git

	d_inode() annotations from David Howells (sat in for-next since
before the beginning of merge window) + four assorted fixes.  FWIW,
the only things here that had been worked on during the merge window are
regression fix for 9p readdir breakage and unlazy_walk() misuse fix...

	Please, pull from
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-linus

	There are several trivial conflicts (fixes had sat in -next all that
time); proposed resolution is in #proposed-merge.

Shortlog:
Al Viro (1):
      RCU pathwalk breakage when running into a symlink overmounting something

David Howells (15):
      VFS: AF_UNIX sockets should call mknod on the top layer only
      VFS: Cachefiles should perform fs modifications on the top layer only
      VFS: Fix up some ->d_inode accesses in the chelsio driver
      VFS: audit: d_backing_inode() annotations
      VFS: kernel/: d_inode() annotations
      VFS: net/unix: d_backing_inode() annotations
      VFS: net/: d_inode() annotations
      VFS: security/: d_backing_inode() annotations
      VFS: security/: d_inode() annotations
      VFS: normal filesystems (and lustre): d_inode() annotations
      VFS: assorted weird filesystems: d_inode() annotations
      VFS: fs library helpers: d_inode() annotations
      VFS: fs/cachefiles: d_backing_inode() annotations
      VFS: fs/inode.c helpers: d_inode() annotations
(Continue reading)

Christoph Hellwig | 24 Apr 21:41 2015
Picon

[PATCH 1/2] block: remove BIO_EOPNOTSUPP

Since the big barrier rewrite/removal in 2007 we never fail FLUSH or
FUA requests, which means we can remove the magic BIO_EOPNOTSUPP flag
to help propagating those to the buffer_head layer.

Signed-off-by: Christoph Hellwig <hch <at> lst.de>
---
 block/bounce.c            |  3 ---
 fs/btrfs/disk-io.c        | 11 ++---------
 fs/btrfs/extent_io.c      |  2 --
 fs/buffer.c               | 10 ----------
 fs/ext4/page-io.c         |  1 -
 fs/nilfs2/segbuf.c        | 12 ------------
 include/linux/blk_types.h |  1 -
 7 files changed, 2 insertions(+), 38 deletions(-)

diff --git a/block/bounce.c b/block/bounce.c
index ab21ba2..4bac725 100644
--- a/block/bounce.c
+++ b/block/bounce.c
 <at>  <at>  -128,9 +128,6  <at>  <at>  static void bounce_end_io(struct bio *bio, mempool_t *pool, int err)
 	struct bio_vec *bvec, *org_vec;
 	int i;

-	if (test_bit(BIO_EOPNOTSUPP, &bio->bi_flags))
-		set_bit(BIO_EOPNOTSUPP, &bio_orig->bi_flags);
-
 	/*
 	 * free up bounce indirect pages used
 	 */
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
(Continue reading)

Julia Lawall | 24 Apr 12:29 2015
Picon

Re: [PATCH] fs/compat: remove redundant 'less than zero' check


On Fri, 24 Apr 2015, Firo Yang wrote:

> It was because that1. nr_segs stand for the number of 'segs' should be large
> or equal to 0, a positive number.

This is not very convincing.  A negative number could be used to encode a
failure of some previous operation, although normally that failure should
have been checked for elsewhere.

> 2. the type of nr_segs is 'unsigned long', It imply a positive number.

OK, this seems like a reasonable explanation.  Currently the test can
never be true, so there is no point to have it.  It would be good to note
this in the commit message of your patch.

julia

> 3. the code if (nr_segs > UIO_MAXIOV) is enough to keep the value nr_segs
> safe.
>
> Regards
> Firo
>
>
>
> On Fri, Apr 24, 2015 at 6:10 PM, Julia Lawall <julia.lawall <at> lip6.fr> wrote:
>
>
>       On Fri, 24 Apr 2015, Firo Yang wrote:
(Continue reading)

Daniel Baluta | 24 Apr 11:46 2015
Picon

[RESEND PATCH] configfs: init configfs module earlier at boot time

We need this earlier in the boot process to allow various subsystems
to use configfs (e.g Industrial IIO).

Also, debugfs is at core_initcall level and configfs should be on
the same level from infrastructure point of view.

Suggested-by: Lars-Peter Clausen <lars <at> metafoo.de>
Signed-off-by: Daniel Baluta <daniel.baluta <at> intel.com>
Reviewed-by: Christoph Hellwig <hch <at> lst.de>
---
 * third resend, adding Andrew

 fs/configfs/mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c
index da94e41..5373567 100644
--- a/fs/configfs/mount.c
+++ b/fs/configfs/mount.c
 <at>  <at>  -173,5 +173,5  <at>  <at>  MODULE_LICENSE("GPL");
 MODULE_VERSION("0.0.2");
 MODULE_DESCRIPTION("Simple RAM filesystem for user driven kernel subsystem configuration.");

-module_init(configfs_init);
+core_initcall(configfs_init);
 module_exit(configfs_exit);
--

-- 
1.9.1

--
(Continue reading)

Amir Goldstein | 24 Apr 09:54 2015

[RFC][PATCH] sysrq: Emergency Remount R/O in reverse order

Hi Al,

This patch is very naive. The fact that it tries to change a behavior
that pre-dates modern git history suggests that I may be missing something.

I am quite sure that the change of behavior is beneficial to my use case
which involves loop mounts on Android, hence uploaded for Android:
https://android-review.googlesource.com/148047

I am not sure about the implications for other use cases, hence this RFC.
Is there a reason to start remount from root fs, because later remounts
may hang or take too long before some watchdog kicks in?

Please enlighten me.
Thanks,

Amir.

---------- Forwarded message ----------

This change fixes a problem where reboot on Android panics the kernel
almost every time when file systems are mounted over loop devices.

Android reboot command does:
- sync
- echo u > /proc/sysrq-trigger
- syscall_reboot

The problem is with sysrq emergency remount R/O trying to remount-ro
in wrong order.
(Continue reading)

Amir A. | 24 Apr 09:01 2015
Picon
Picon

(unknown)


--
THANKS FOR YOUR LAST MAIL
THE INFORMATION NEEDED ARE
NAME
PHONE
FAX
ADDRESS
OCCUPATION
AGE
to enable my further discussion with you.
Best regards and wishes to you all.
Amir A. Khanmammadov
REPLY TO
amir2016 <at> vera.com.uy
--

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Christophe Leroy | 23 Apr 17:03 2015
Picon

[PATCH v2] splice: sendfile() at once fails for big files

Using sendfile with below small program to get MD5 sums of some files,
it appear that big files (over 64kbytes with 4k pages system) get a
wrong MD5 sum while small files get the correct sum.
This program uses sendfile() to send a file to an AF_ALG socket
for hashing.

/* md5sum2.c */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <linux/if_alg.h>

int main(int argc, char **argv)
{
	int sk = socket(AF_ALG, SOCK_SEQPACKET, 0);
	struct stat st;
	struct sockaddr_alg sa = {
		.salg_family = AF_ALG,
		.salg_type = "hash",
		.salg_name = "md5",
	};
	int n;

	bind(sk, (struct sockaddr*)&sa, sizeof(sa));

(Continue reading)

Firo Yang | 23 Apr 11:11 2015
Picon

[PATCH] procfs: Remove unnecessary cast in alloc codes

Remove unnecessary cast of allocation return value in
fs/proc/inode.c::proc_alloc_inode().

Signed-off-by: Firo Yang <firogm <at> gmail.com>
---
 fs/proc/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 7697b66..08a7235 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
 <at>  <at>  -58,7 +58,7  <at>  <at>  static struct inode *proc_alloc_inode(struct super_block *sb)
 	struct proc_inode *ei;
 	struct inode *inode;

-	ei = (struct proc_inode *)kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL);
+	ei = kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL);
 	if (!ei)
 		return NULL;
 	ei->pid = NULL;
--

-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Mickaël Salaün | 23 Apr 01:41 2015
Picon

procfs/d_invalidate break userland

Hi,

For your information, the commit bbd5192412fdedbae00888316bfe350bf89d0458 (proc: Update
proc_flush_task_mnt to use d_invalidate), in the v3.17, break some userland use of procfs.

In a user namespace, I'm using /proc/≤pid>/task/≤tid>/fdinfo to mount a tmpfs, chdir into it, terminate
the <tid> thread, and use the tmpfs as a private working directory for PID 1. This trick is useful to
disconnect/d_drop a directory from the current file system and make it inaccessible to the other
processes (kind of an O_TMPFILE for directory).

With the v3.17 this is no more possible because it's no more possible to mount anything in this tmpfs nor use
the previously mounted file systems in this tmpfs.

The new d_invalidate is really good to lazily invalidate/umount an entire hierarchy but I'm not sure the
intention was to remove this useful "feature" ;)

 Mickaël

Qing Chang | 21 Apr 15:00 2015
Picon

from: Qing Chang

Hiya linux

http://bouwwerken-duchateau.be/wealth.php?fight=g69qhu9mxezr2d

changq <at> gmail.com

Sent from my iPhone
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Dmitry Krivenok | 19 Apr 20:19 2015
Picon

[PATCH 1/1] null_blk: fix handling of BLKPREP_DEFER case

When we fail to allocate new cmd in null_rq_prep_fn we return BLKPREP_DEFER
which is not handled properly. In single-queue mode of null_blk the following
command hangs forever in io_schedule():
$ dd if=/dev/nullb0 of=/dev/null bs=8M count=5000 iflag=direct

The reason is that when 64 commands have been allocated, the 65th command
allocation will fail due to missing free tag. The request, however, will be
kept in the queue which will never be started again (unless you run another
command that does I/O to /dev/nullb0).

This small patch tries to solve the issue by stopping the queue when we
detect that all tags were exhausted and starting it again when we free the tag.

I've verified that the command mentioned above doesn't hang anymore and also
made sure that null_blk with my change survives fio-based stress tests.

Signed-off-by: Dmitry V. Krivenok <krivenok.dmitry <at> gmail.com>
---
 drivers/block/null_blk.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 65cd61a..4ac684b 100644
--- a/drivers/block/null_blk.c
+++ b/drivers/block/null_blk.c
 <at>  <at>  -25,6 +25,7  <at>  <at>  struct nullb_queue {
     unsigned int queue_depth;

     struct nullb_cmd *cmds;
+    bool no_cmds;
(Continue reading)


Gmane