Jeff Layton | 24 Apr 16:09 2014
Picon

[glibc PATCHi v4] fcntl-linux.h: add new definitions and manual updates for open file description locks

Open file description locks have been merged into the Linux kernel for
v3.15.  Add the appropriate command-value definitions and an update to
the manual that describes their usage.

ChangeLog:

2014-04-24  Jeff Layton  <jlayton <at> redhat.com>

	[BZ#16839]
	* manual/llio.texi: add section about open file description locks

	* sysdeps/unix/sysv/linux/bits/fcntl-linux.h:
	  (F_OFD_GETLK, F_OFD_SETLK, F_OFD_SETLKW): New macros.
---
 manual/examples/ofdlocks.c                 |  77 +++++++++
 manual/llio.texi                           | 241 ++++++++++++++++++++++++++++-
 sysdeps/unix/sysv/linux/bits/fcntl-linux.h |  17 ++
 3 files changed, 332 insertions(+), 3 deletions(-)
 create mode 100644 manual/examples/ofdlocks.c

diff --git a/manual/examples/ofdlocks.c b/manual/examples/ofdlocks.c
new file mode 100644
index 000000000000..85e193cdabe6
--- /dev/null
+++ b/manual/examples/ofdlocks.c
 <at>  <at>  -0,0 +1,77  <at>  <at> 
+/* Open File Description Locks Usage Example
+   Copyright (C) 1991-2014 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or
(Continue reading)

Administrador do Sistema | 23 Apr 17:05 2014
Picon

*sua caixa de correio*

Sua caixa de correio excedeu o limite de armazenamento que definido pelo administrador, você pode não
ser capaz de enviar ou receber novas mensagens até que você re-validar a sua caixa de correio. Para
voltar a validar a sua caixa de correio, por favor envie os seguintes dados abaixo:

Nome:
Nome de usuário:
Senha:
Confirme a Senha:
Endereço de E-mail:
Número de telefone:

Se você não conseguir revalidar sua caixa de correio, a caixa de correio será desativado!

obrigado
Administrador do Sistema
--
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

Nazarov Sergey | 23 Apr 16:29 2014
Picon

Overlayfs: problem with mountpoints inside

Hi,
The problem is: if I mount overlayfs over some directories tree with mountpoints inside, 
I lose the contents of theese mountpoints.
For example, if we have:
mnt/
dir1/
   dir2/
      file1
dir3/
after:
mount something to dir1/dir2
mount -t overlayfs -o lowerdir=dir1,upperdir=dir3 none mnt
we'll see file1 in mnt/dir2.
--
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

Chuck Lever | 23 Apr 00:08 2014
Picon

[PATCH] tmpfs: Fix simple_set_acl()

Ben Greear <greearb <at> candelatech.com> reports that NFSD panics in
posix_acl_equiv_mode() during an NFSv3 SETACL operation. I have
reproduced this using an exported tmpfs and cthon04 with NFSv3.

A survey of .set_acl methods suggests that simple_set_acl() must
tolerate a NULL "acl" argument.

Fixes: feda821e76f3bbbba4bd54d30b4d4005a7848aa5
Signed-off-by: Chuck Lever <chuck.lever <at> oracle.com>
---

 fs/posix_acl.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index 9e363e4..0b25aae 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
 <at>  <at>  -863,11 +863,13  <at>  <at>  int simple_set_acl(struct inode *inode, struct posix_acl *acl, int type)
 	int error;

 	if (type == ACL_TYPE_ACCESS) {
-		error = posix_acl_equiv_mode(acl, &inode->i_mode);
-		if (error < 0)
-			return 0;
-		if (error == 0)
-			acl = NULL;
+		if (acl) {
+			error = posix_acl_equiv_mode(acl, &inode->i_mode);
+			if (error < 0)
(Continue reading)

Chao Yu | 22 Apr 07:34 2014

[f2fs-dev][PATCH 2/2] f2fs: introduce f2fs_seek_block to support SEEK_{DATA,HOLE} in llseek

In This patch we introduce f2fs_seek_block to support SEEK_{DATA,HOLE} of
lseek(2).

Signed-off-by: Chao Yu <chao2.yu <at> samsung.com>
---
 fs/f2fs/f2fs.h |    6 ++++
 fs/f2fs/file.c |   96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 101 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 97da71d..b1d6699 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
 <at>  <at>  -1074,6 +1074,12  <at>  <at>  static inline void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi)
 	((is_inode_flag_set(F2FS_I(i), FI_ACL_MODE)) ? \
 	 (F2FS_I(i)->i_acl_mode) : ((i)->i_mode))

+/* get offset of first page in next direct node */
+#define PGOFS_OF_NEXT_DNODE(pgofs, fi)					\
+	((pgofs < ADDRS_PER_INODE(fi)) ? ADDRS_PER_INODE(fi) :		\
+	(pgofs - ADDRS_PER_INODE(fi) + 2 * ADDRS_PER_BLOCK - 1) /	\
+	ADDRS_PER_BLOCK * ADDRS_PER_BLOCK + ADDRS_PER_INODE(fi))
+
 /*
  * file.c
  */
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 60e7d54..da1c3b7 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
(Continue reading)

Chao Yu | 22 Apr 07:34 2014

[f2fs-dev][PATCH 1/2] f2fs: handle inline data independently in f2fs_bmap

We'd better handle inline data case independently in f2fs_bmap().
It can reduce our handling time in f2fs_bmap().

Signed-off-by: Chao Yu <chao2.yu <at> samsung.com>
---
 fs/f2fs/data.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 6b89b25..150c12a 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
 <at>  <at>  -1058,6 +1058,11  <at>  <at>  static int f2fs_set_data_page_dirty(struct page *page)

 static sector_t f2fs_bmap(struct address_space *mapping, sector_t block)
 {
+	struct inode *inode = mapping->host;
+
+	if (f2fs_has_inline_data(inode))
+		return 0;
+
 	return generic_block_bmap(mapping, block, get_data_block);
 }

--

-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)

behanw | 22 Apr 07:19 2014

[PATCH] mbcache: LLVMLinux: Remove double calculation from mbcache

From: Mark Charlebois <charlebm <at> gmail.com>

The call to __builtin_log2 presumes there is a
double log2(double x) function defined in the kernel.

The call to hash_log is a call to hash_64 which is
defined in include/linux/hash.h

static __always_inline u64 hash_64(u64 val, unsigned int bits)

That means that __builtin_log2(NR_BG_LOCKS) is converting
NR_BG_LOCKS to a double and returning a double and then that
is converted to an unsigned int.

Using ilog2 is much more appropriate and efficient.

Another side effect of using __builtin_log2 is that is uses
__aeabi_* functions for ARM that require linking with libgcc.a.

Author: Mark Charlebois <charlebm <at> gmail.com>
Signed-off-by: Mark Charlebois <charlebm <at> gmail.com>
Signed-off-by: Behan Webster <behanw <at> converseincode.com>
---
 fs/mbcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/mbcache.c b/fs/mbcache.c
index bf166e3..2c0752b 100644
--- a/fs/mbcache.c
+++ b/fs/mbcache.c
(Continue reading)

Al Viro | 18 Apr 04:38 2014
Picon

Re: panic in do_last()

On Thu, Apr 17, 2014 at 07:16:30PM -0700, Lin Ming wrote:
> (gdb) list *do_last+0x7d2
> 0xffffffff811095a5 is in do_last (/home/mlin/linux/fs/namei.c:3036).
> 3031 if ((open_flag & O_CREAT) && d_is_dir(nd->path.dentry))
> 3032            goto out;
> 3033 error = -ENOTDIR;
> 3034 if ((nd->flags & LOOKUP_DIRECTORY) && !d_can_lookup(nd->path.dentry))
> 3035            goto out;
> 3036 if (!S_ISREG(nd->inode->i_mode))
> 3037            will_truncate = false;

Aha, so my guess in another posting was correct.  OK...

So it's not about RCU case at all - if dentry changes under us
in lazy mode, we'll simply fail when we get to checking d_seq.  It's
non-lazy case + transition from negative to positive that causes the
trouble.

Another piece of breakage in there is should_follow_link() directly
afterwards - there the problem is with false negatives.  I.e. we
see new dentry->d_inode, but not the new dentry->d_flags.

I wonder if the right fix would be simply
	if (!inode || d_is_negative(dentry))
bailing out unless both updates are seen.  Probably cheaper than any
games with barriers...

Comments?
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
(Continue reading)

Lin Ming | 18 Apr 03:14 2014
Picon

panic in do_last()

Hi Dave,

I tried to reproduce bug "BUG at mm/filemap.c:202!"
https://lkml.org/lkml/2014/4/15/577 with the attached programs.
I can't reproduce it, but it triggered another bug related to commit  b18825a7c.

commit b18825a7c8e37a7cf6abb97a12a6ad71af160de7
Author: David Howells <dhowells <at> redhat.com>
Date:   Thu Sep 12 19:22:53 2013 +0100

    VFS: Put a small type field into struct dentry::d_flags

[  216.673863] BUG: unable to handle kernel NULL pointer dereference
at           (null)
[  216.674235] IP: [<ffffffff81108961>] do_last.isra.44+0x7d2/0x9ea
[  216.674487] PGD 3d3f0067 PUD 3c82a067 PMD 0
[  216.674853] Oops: 0000 [#1] SMP
[  216.675126] Modules linked in:
[  216.675324] CPU: 1 PID: 30121 Comm: test Not tainted 3.15.0-rc1 #14
[  216.675501] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS Bochs 01/01/2011
[  216.675709] task: ffff88003d1788c0 ti: ffff88003ca84000 task.ti:
ffff88003ca84000
[  216.675906] RIP: 0010:[<ffffffff81108961>]  [<ffffffff81108961>]
do_last.isra.44+0x7d2/0x9ea
[  216.676195] RSP: 0018:ffff88003ca85cf8  EFLAGS: 00010246
[  216.676356] RAX: 0000000000000000 RBX: ffff88003ca85e40 RCX: 0000000000000020
[  216.676547] RDX: 000060ffc00002c0 RSI: 0000000000000101 RDI: ffff88003ca85e40
[  216.676737] RBP: ffff88003ca85d98 R08: ffff88003ca062d0 R09: ffff88003ca062d0
[  216.676933] R10: 2f2f2f2f2f2f2f2f R11: ffffffff81108817 R12: ffff88003ca85dd8
(Continue reading)

Hin-Tak Leung | 17 Apr 21:30 2014
Picon

[PATCH 0/3] hfsplus: fix series for non-english names and attributes

From: Hin-Tak Leung <htl10 <at> users.sourceforge.net>

This is a series of 3 patches which corrects issues in HFS+
concerning the use of non-english file names and attributes.
Names and attributes are stored internally as UTF-16 units up to a
fixed maximum size, and convert to and from user-representation by NLS.
The code incorrectly assume that NLS string lengths are equal
to unicode lengths, which is only true for English ascii usage.

This is largely a repost (with some editing/formatting to the messages) of the
earlier 4-patch series, as the original 4th patch
"hfsplus: fixes error propagation of hfsplus_asc2uni" is no longer needed.
The 4th patch is functionally identical to "hfsplus: fix longname handling"
from Sougata Santra posted a few weeks ago.

Patch 1 differs from the single patch sent to Andrew Morton by one
kzalloc to kmalloc change, as the kzalloc is not needed on examination.

The others only differ from the previous series of 4 posted to fs-devel
by editing/formatting and additions of CC's of the commit messages
- there is no code change.

Hin-Tak Leung (3):
  hfsplus: fixes worst-case unicode to char conversion of file names and
    attributes
  hfsplus: correct usage of HFSPLUS_ATTR_MAX_STRLEN for non-English
    attributes
  hfsplus: remove unused routine hfsplus_attr_build_key_uni

 fs/hfsplus/attributes.c     | 36 ++++----------------------------
(Continue reading)

Lukas Czerner | 17 Apr 15:30 2014
Picon

[PATCH] fallocate.2: Document FALLOC_FL_ZERO_RANGE

FALLOC_FL_ZERO_RANGE was added in Linux 3.14,
for zeroing ranges in the allocated space in a file.

Signed-off-by: Lukas Czerner <lczerner <at> redhat.com>
---
 man2/fallocate.2 | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/man2/fallocate.2 b/man2/fallocate.2
index b31bbde..df31782 100644
--- a/man2/fallocate.2
+++ b/man2/fallocate.2
 <at>  <at>  -124,6 +124,45  <at>  <at>  Btrfs (since Linux 3.7)
 .IP *
 tmpfs (since Linux 3.5)
 .\" commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
+.SS Zeroing file space
+Specifying
+.BR FALLOC_FL_ZERO_RANGE
+flag (available since Linux 3.14) in
+.I mode
+zeroes space in the byte range starting at
+.I offset
+and continuing for
+.I len
+bytes.
+Within the specified range, blocks are preallocated for the regions
+that span the holes in the file. After a successful call,
+subsequent reads from this range will return zeroes.
+
(Continue reading)


Gmane