David Rientjes | 25 Mar 00:08 2015
Picon

[patch 1/4] fs, jfs: remove slab object constructor

Mempools based on slab caches with object constructors are risky because
element allocation can happen either from the slab cache itself, meaning
the constructor is properly called before returning, or from the mempool
reserve pool, meaning the constructor is not called before returning,
depending on the allocation context.

For this reason, we should disallow creating mempools based on slab
caches that have object constructors.  Callers of mempool_alloc() will
be responsible for properly initializing the returned element.

Then, it doesn't matter if the element came from the slab cache or the
mempool reserved pool.

The only occurrence of a mempool being based on a slab cache with an
object constructor in the tree is in fs/jfs/jfs_metapage.c.  Remove it
and properly initialize the element in alloc_metapage().

At the same time, META_free is never used, so remove it as well.

Signed-off-by: David Rientjes <rientjes <at> google.com>
---
 fs/jfs/jfs_metapage.c | 31 ++++++++++++-------------------
 fs/jfs/jfs_metapage.h |  1 -
 2 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
 <at>  <at>  -183,30 +183,23  <at>  <at>  static inline void remove_metapage(struct page *page, struct metapage *mp)

(Continue reading)

Dave Kleikamp | 23 Mar 22:06 2015
Picon

[PATCH][3.2.y][3.4.y][3.10.y] jfs: fix readdir regression

Upstream commit 44512449, "jfs: fix readdir cookie incompatibility
with NFSv4", was backported incorrectly into the stable trees which
used the filldir callback (rather than dir_emit). The position is
being incorrectly passed to filldir for the . and .. entries.

The still-maintained stable trees that need to be fixed are 3.2.y,
3.4.y and 3.10.y.

https://bugzilla.kernel.org/show_bug.cgi?id=94741

Signed-off-by: Dave Kleikamp <dave.kleikamp <at> oracle.com>
Cc: jfs-discussion <at> lists.sourceforge.net
Cc: stable <at> vger.kernel.org
---
 fs/jfs/jfs_dtree.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
index 9f7c758..f6f32fa 100644
--- a/fs/jfs/jfs_dtree.c
+++ b/fs/jfs/jfs_dtree.c
 <at>  <at>  -3103,7 +3103,7  <at>  <at>  int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
 				 * self "."
 				 */
 				filp->f_pos = 1;
-				if (filldir(dirent, ".", 1, 0, ip->i_ino,
+				if (filldir(dirent, ".", 1, 1, ip->i_ino,
 					    DT_DIR))
 					return 0;
 			}
(Continue reading)

Richard Weinberger | 21 Mar 00:33 2015
Picon

JFS readdir() issues in stable 3.2

Hi!

Mainline commit 44512449c0ab368889dd13ae0031fba74ee7e1d2
(jfs: fix readdir cookie incompatibility with NFSv4) does not work as expected on 3.2.
Maybe on other stable kernels too.

UML stumbled over it:
https://bugzilla.kernel.org/show_bug.cgi?id=94741

If you run the attached readdir.c on a JFS on stable 3.2.51+ readdir() will not
increment the directory offset nor return NULL, hence the caller will loop forever.
It looks like if the current directory offset is > 0 and you run seekdir(telldir())
the next readdir() call will not increment it.

Dave, has your fix some unnamed dependencies which need backporting too?

Thanks,
//richard
Attachment (readdir.c): text/x-csrc, 442 bytes
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jfs-discussion mailing list
(Continue reading)

Omar Sandoval | 16 Mar 12:33 2015

[RFC PATCH 0/5] Remove rw parameter from direct_IO()

Hi,

Al, here's some cleanup that you mentioned back in December that I got
around to (https://lkml.org/lkml/2014/12/15/28).

In summary, the rw parameter to a_ops->direct_IO() is redundant with
.type in struct iov_iter. Additionally, rw is inconsistently checked for
being a WRITE; some filesystems do rw == WRITE, others do rw & WRITE,
and others do both within the same function :) The distinction is that
swapout may OR in the ITER_BVEC flag in the rw passed to ->direct_IO(),
so the two are not equivalent (although this really only happens for
swap-over-NFS, but it's scary nonetheless). After looking through all of
these, it definitely looks like every check means for ANY write, not
just non-kernel writes.

So, the solution presented here is:

- Add a helper, iov_iter_rw(), which always returns either READ or
  WRITE, no ITER_.* or REQ_.* nonsense mixed in. For consistency, the
  return value is always checked for equality
- Get rid of all uses of rw in any implementations of direct_IO,
  starting with the generic code
- Nuke the actual parameter and update the documentation

I decided to squish all of the filesystems together in patch 4 to avoid
inundating the mailing lists with 20+ mostly two-line patches, but I can
split those out if that's any better. Additionally, patch 1 pulls fs.h
into uio.h, which seems undesirable.

These were mostly just compile tested, with a couple of direct I/O
(Continue reading)

Rasmus Villemoes | 19 Mar 12:28 2015
Picon

[PATCH] fs: cleanup slight list_entry abuse

list_entry is just a wrapper for container_of, but it is arguably
wrong (and slightly confusing) to use it when the pointed-to struct
member is not a struct list_head. Use container_of directly instead.

Signed-off-by: Rasmus Villemoes <linux <at> rasmusvillemoes.dk>
---
Most of these predate git. If I'm the only one who has been confused
by this in 10 years, maybe it's not worth the churn.

 fs/affs/affs.h              | 2 +-
 fs/befs/befs.h              | 2 +-
 fs/coda/coda_linux.h        | 2 +-
 fs/hfs/hfs_fs.h             | 2 +-
 fs/hfsplus/hfsplus_fs.h     | 2 +-
 fs/hpfs/hpfs_fn.h           | 2 +-
 fs/jffs2/os-linux.h         | 2 +-
 fs/jfs/jfs_incore.h         | 2 +-
 fs/minix/minix.h            | 2 +-
 fs/ntfs/inode.h             | 2 +-
 fs/squashfs/squashfs_fs_i.h | 2 +-
 fs/sysv/sysv.h              | 2 +-
 fs/udf/udf_i.h              | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/fs/affs/affs.h b/fs/affs/affs.h
index c8764bd7497d..64469527d445 100644
--- a/fs/affs/affs.h
+++ b/fs/affs/affs.h
 <at>  <at>  -64,7 +64,7  <at>  <at>  struct affs_inode_info {
 /* short cut to get to the affs specific inode data */
(Continue reading)

Felipe Monteiro de Carvalho | 21 Feb 11:26 2015
Picon

Cannot find inode

Hello,

I am writing a software to read jfs partitions, and I can already read
the root and many directories / files inside it.

But some dirs / files have a high inode number (0x106 and 0x107), but
my Fileset Inode Map has only 3 extents, which means that I have only
32*3 inodes available, so I cannot locate this high inode nr =(

Any ideas of what I am failing to understand here??? How to find inode
with number 0x106?

Here is the screenshot of the root inode:

http://magnifier.sourceforge.net/tmp/jfs_strange_inode_nr.png

Note the selected area:

06010000 FF 07 <item name>

I interpreted this as being:

struct ldtentry {
__le32 inumber;-> $106
s8 next; -> FF
u8 namlen; -> 07
...

And therefore inode nr 0x106 but like I said, my Fileset Inode
Allocation Map has only 3 extents in iag.inoext each with len=4 which
(Continue reading)

Dave Kleikamp | 12 Feb 17:32 2015
Picon

[GIT PULL] jfs changes for v3.20

The following changes since commit 53262d12d1658669029ab39a63e3d314108abe66:

  Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
(2014-12-23 11:03:28 -0800)

are available in the git repository at:

  git://github.com/kleikamp/linux-shaggy.git tags/jfs-3.20

for you to fetch changes up to 648695c74811f09a8ad80d7c3be72b8169589a64:

  jfs: Deletion of an unnecessary check before the function call "unload_nls" (2015-02-02 15:02:34 -0600)

----------------------------------------------------------------
a couple cleanups for jfs

----------------------------------------------------------------
Al Viro (1):
      jfs: get rid of homegrown endianness helpers

Markus Elfring (1):
      jfs: Deletion of an unnecessary check before the function call "unload_nls"

 fs/jfs/endian24.h  | 49 ------------------------------------------------
 fs/jfs/jfs_dtree.c |  4 ++--
 fs/jfs/jfs_types.h | 55 ++++++++++++++++++++++++++++++++----------------------
 fs/jfs/jfs_xtree.h | 25 +++++++++----------------
 fs/jfs/super.c     |  3 +--
 5 files changed, 45 insertions(+), 91 deletions(-)
 delete mode 100644 fs/jfs/endian24.h
(Continue reading)

Uwe Brauer | 7 Feb 17:54 2015
Picon

ssd+3.7 kernel trim: problems, read-only.

Hello

I tried to send this email via gmane, but I never saw it on that list,
so I resend it.

Using a Thinkpad Laptop with a new Samsung ssd, I have installed kubuntu
10.04 and chosen jfs. Since 10.04 is too old to support trimming, I
compiled and installed kernel 3.7 and complied fstrim.

The relevant entry of my fstab reads as follows.

UUID=8e06979b-2dbf-4192-8513-957bafa74a1e /               jfs
nodiratime,noatime,errors=remount-ro 0       

The recommendation to use nodiratime and noatime for ssd I found
for example in http://askubuntu.com/questions/1400/how-do-i-optimize-the-os-for-ssds

I run fstrim periodically via cron and everything seems fine.

However from time to time by system ends up to be mounted *read-only*.

 dmesg  gives errors like this:

[105074.721310] ERROR: (device sda5): dbDiscardAG: no memory for trim array

(I could send the complete result of dmesg, but it is large. I obtained
it by dmesg | pastebinit).

Since the fstab entry states errors=remount-ro I presumed this is the
source for the read only remount.
(Continue reading)

nick | 28 Dec 01:58 2014
Picon

Remove TO DO in jfs_xtree.c

Greetings Dave,
I am wondering why there is a TO DO above this code:
        * ToDo:  tlocks should be on doubly-linked list, so we can
        * quickly remove it and add it to the end.
        */

       /*
       * Move parent page's tlock to the end of the tid's tlock list
       */
       if (log && mp->lid && (tblk->last != mp->lid) &&
           lid_to_tlock(mp->lid)->tid) {
               lid_t lid = mp->lid;
                struct tlock *prev;

             tlck = lid_to_tlock(lid);

             if (tblk->next == lid)
                       tblk->next = tlck->next;
             else {
                       for (prev = lid_to_tlock(tblk->next);
                             prev->next != lid;
                            prev = lid_to_tlock(prev->next)) {
                              assert(prev->next);
                      }
                        prev->next = tlck->next;
              }
              lid_to_tlock(tblk->last)->next = lid;
              tlck->next = 0;
               tblk->last = lid;
       }
(Continue reading)

Pieter Smith | 13 Nov 22:23 2014
Picon

[PATCH 30/56] fs/jfs: support compiling out splice

Compile out splice support from jfs when the splice-family of syscalls is not
supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined).

Signed-off-by: Pieter Smith <pieter <at> boesman.nl>
---
 fs/jfs/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/jfs/file.c b/fs/jfs/file.c
index 33aa0cc..88df840 100644
--- a/fs/jfs/file.c
+++ b/fs/jfs/file.c
 <at>  <at>  -156,8 +156,8  <at>  <at>  const struct file_operations jfs_file_operations = {
 	.read_iter	= generic_file_read_iter,
 	.write_iter	= generic_file_write_iter,
 	.mmap		= generic_file_mmap,
-	.splice_read	= generic_file_splice_read,
-	.splice_write	= iter_file_splice_write,
+	SPLICE_READ_INIT(generic_file_splice_read)
+	SPLICE_WRITE_INIT(iter_file_splice_write)
 	.fsync		= jfs_fsync,
 	.release	= jfs_release,
 	.unlocked_ioctl = jfs_ioctl,
--

-- 
1.9.1

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
(Continue reading)

Jan Kara | 4 Nov 12:19 2014
Picon

[PATCH 0/12 v4] Moving i_dquot out of struct inode

  Hello,

  here is a new version of my patch series which moves i_dquot array from
struct inode into filesystem private part of the inode. Thus filesystems which
don't need it save 2 pointers in their inodes (would be 3 after we add project
quota support into generic quota).

The patch series also contains a change to quotactl so that each filesystem
can set quota types it supports. This is in the end unrelated change
(originally it was necessary for i_dquot moving but in the end I changed
things so that it's not anymore). I can move that into a separate series
but I was somewhat reluctant to do that since that would mean another 6
one-line patches to the same files we are changing here...

If people like the patches, I will queue this series into my tree for
the next merge window. For that I'd prefer to get acks from affected fs
maintainers (the changes are pretty trivial and I don't feel it's a must but
still I'd prefer fs maintainers to ack they are aware of the changes).

								Honza

Changes since v1:
* Inode field names are now named enum
* Quota type masks now have names like QTYPE_MASK_{USR|GRP|PRJ} instead of
  opencoding shifts.

Changes since v2:
* Use ->get_dquots callback instead of inode fields framework
* rebased on Linus' tree as of 3.18-rc1 + something.

(Continue reading)


Gmane