24 Jun, 2015

1 commit

  • 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
    Signed-off-by: Al Viro

    Rasmus Villemoes
     

21 Sep, 2012

1 commit


31 May, 2012

1 commit

  • Currently JFFS2 file-system maps the VFS "superblock" abstraction to the
    write-buffer. Namely, it uses VFS services to synchronize the write-buffer
    periodically.

    The whole "superblock write-out" VFS infrastructure is served by the
    'sync_supers()' kernel thread, which wakes up every 5 (by default) seconds and
    writes out all dirty superblock using the '->write_super()' call-back. But the
    problem with this thread is that it wastes power by waking up the system every
    5 seconds no matter what. So we want to kill it completely and thus, we need to
    make file-systems to stop using the '->write_super' VFS service, and then
    remove it together with the kernel thread.

    This patch switches the JFFS2 write-buffer management from
    '->write_super()'/'->s_dirt' to a delayed work. Instead of setting the 's_dirt'
    flag we just schedule a delayed work for synchronizing the write-buffer.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: Al Viro

    Artem Bityutskiy
     

27 Mar, 2012

1 commit

  • There were a few instances of the old MTD interface remaining for JFFS2. We
    fix one error that shows up (only when CONFIG_JFFS2_FS_WRITEBUFFER is not
    defined) like this:

    fs/jffs2/read.c: In function 'jffs2_read_dnode':
    fs/jffs2/read.c:36:8: error: 'struct mtd_info' has no member named 'read'
    fs/jffs2/read.c:112:8: error: 'struct mtd_info' has no member named 'read'
    ...

    We also simply remove two macros that are not in use, were not updated to
    the new MTD interface, and don't even utilize the old interface properly.
    (That means they weren't used since commit 8593fbc6, year 2006; almost 6
    years ago, for those who don't want to do the math)

    Reported-by: Randy Dunlap
    Signed-off-by: Brian Norris
    Acked-by: Randy Dunlap
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Brian Norris
     

19 Oct, 2011

1 commit

  • Currently jffs2 has compile-time constants (and .config options)
    controlling whether or not the various compression/decompression
    drivers are built in and enabled. This is fine for embedded
    systems, but it clashes with distribution kernels. Distro kernels
    tend to turn on everything; this causes OpenFirmware to fall
    over, as it understands ZLIB-compressed inodes. Booting a kernel
    that has LZO compression enabled, writing to the boot partition,
    and then rebooting causes OFW to fail to read the kernel from
    the filesystem. This is because LZO compression has priority
    when writing new data to jffs2, if LZO is enabled.

    This patch adds mount option parsing, and a single supported
    option ("compr=none"). This adds the flexibility of being
    able to specify which compressor overrides on a per-superblock
    basis. For now, we can simply disable compression;
    additional flexibility coming soon.

    v2: kill some printks, and implement show_options as suggested
    by Artem Bityutskiy.

    Signed-off-by: Andres Salomon
    Signed-off-by: Artem Bityutskiy

    Andres Salomon
     

01 Aug, 2011

1 commit


24 Jul, 2011

1 commit

  • casting int * to mode_t * is not a good thing - on a *lot* of big-endian
    architectures mode_t happens to be smaller than int and there it breaks
    quite spectaculary...

    Fucked-up-by: commit cfc8dc6f6f69ede939e09c2af06a01adee577285
    Signed-off-by: Al Viro

    Al Viro
     

21 Jul, 2011

1 commit

  • Btrfs needs to be able to control how filemap_write_and_wait_range() is called
    in fsync to make it less of a painful operation, so push down taking i_mutex and
    the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some
    file systems can drop taking the i_mutex altogether it seems, like ext3 and
    ocfs2. For correctness sake I just pushed everything down in all cases to make
    sure that we keep the current behavior the same for everybody, and then each
    individual fs maintainer can make up their mind about what to do from there.
    Thanks,

    Acked-by: Jan Kara
    Signed-off-by: Josef Bacik
    Signed-off-by: Al Viro

    Josef Bacik
     

27 May, 2011

1 commit

  • Tell the filesystem if we just updated timestamp (I_DIRTY_SYNC) or
    anything else, so that the filesystem can track internally if it
    needs to push out a transaction for fdatasync or not.

    This is just the prototype change with no user for it yet. I plan
    to push large XFS changes for the next merge window, and getting
    this trivial infrastructure in this window would help a lot to avoid
    tree interdependencies.

    Also remove incorrect comments that ->dirty_inode can't block. That
    has been changed a long time ago, and many implementations rely on it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

10 Aug, 2010

1 commit


28 May, 2010

1 commit


20 May, 2010

1 commit


24 Jun, 2009

1 commit


12 Jun, 2009

1 commit

  • jffs2_write_super is only called from super.c and doesn't use any
    functionality from fs.c. So move it over to super.c and make it
    static there.

    [should go in through the vfs tree as it is a requirement for the
    next patch]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

12 Jul, 2008

1 commit


02 May, 2008

1 commit


08 Feb, 2008

1 commit

  • Stop the JFFS2 filesystem from using iget() and read_inode(). Replace
    jffs2_read_inode() with jffs2_iget(), and call that instead of iget().
    jffs2_iget() then uses iget_locked() directly and returns a proper error code
    instead of an inode in the event of an error.

    jffs2_do_fill_super() returns any error incurred when getting the root inode
    instead of EINVAL.

    Signed-off-by: David Howells
    Cc: David Woodhouse
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

20 Oct, 2007

1 commit

  • [In commit 9ed437c50d89eabae763dd422579f73fdebf288d we fixed a problem
    with standard permissions on newly-created inodes, when POSIX ACLs are
    enabled. This cleans it up...]

    The attached patch separate jffs2_init_acl() into two parts.

    The one is jffs2_init_acl_pre() called from jffs2_new_inode().
    It compute ACL oriented inode->i_mode bits, and allocate in-memory ACL
    objects associated with the new inode just before when inode meta
    infomation is written to the medium.

    The other is jffs2_init_acl_post() called from jffs2_symlink(),
    jffs2_mkdir(), jffs2_mknod() and jffs2_do_create().
    It actually writes in-memory ACL objects into the medium next to
    the success of writing meta-information.

    In the current implementation, we have to write a same inode meta
    infomation twice when inode->i_mode is updated by the default ACL.
    However, we can avoid the behavior by putting an updated i_mode
    before it is written at first, as jffs2_init_acl_pre() doing.

    Signed-off-by: KaiGai Kohei
    Signed-off-by: David Woodhouse

    KaiGai Kohei
     

22 Aug, 2007

1 commit

  • When POSIX ACL support was enabled, we weren't writing correct
    legacy modes to the medium on inode creation, or when the ACL was set.
    This meant that the permissions would be incorrect after the file system
    was remounted.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

28 Apr, 2007

1 commit


27 Apr, 2007

1 commit


25 Apr, 2007

1 commit

  • In particular, remove the bit in the LICENCE file about contacting
    Red Hat for alternative arrangements. Their errant IS department broke
    that arrangement a long time ago -- the policy of collecting copyright
    assignments from contributors came to an end when the plug was pulled on
    the servers hosting the project, without notice or reason.

    We do still dual-license it for use with eCos, with the GPL+exception
    licence approved by the FSF as being GPL-compatible. It's just that nobody
    has the right to license it differently.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

13 Feb, 2007

1 commit

  • Many struct inode_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

29 Jun, 2006

1 commit


23 Jun, 2006

1 commit

  • Give the statfs superblock operation a dentry pointer rather than a superblock
    pointer.

    This complements the get_sb() patch. That reduced the significance of
    sb->s_root, allowing NFS to place a fake root there. However, NFS does
    require a dentry to use as a target for the statfs operation. This permits
    the root in the vfsmount to be used instead.

    linux/mount.h has been added where necessary to make allyesconfig build
    successfully.

    Interest has also been expressed for use with the FUSE and XFS filesystems.

    Signed-off-by: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

27 May, 2006

1 commit


23 May, 2006

2 commits

  • o Add a flag MTD_BIT_WRITEABLE for devices that allow single bits to be
    cleared.
    o Replace MTD_PROGRAM_REGIONS with a cleared MTD_BIT_WRITEABLE flag for
    STMicro and Intel Sibley flashes with internal ECC. Those flashes
    disallow clearing of single bits, unlike regular NOR flashes, so the
    new flag models their behaviour better.
    o Remove MTD_ECC. After the STMicro/Sibley merge, this flag is only set
    and never checked.

    Signed-off-by: Joern Engel

    Joern Engel
     
  • In 2002, STMicro started producing NOR flashes with internal ECC protection
    for small blocks (8 or 16 bytes). Support for those flashes was added by me.
    In 2005, Intel Sibley flashes copied this strategy and Nico added support for
    those. Merge the code for both.

    Signed-off-by: Joern Engel

    Joern Engel
     

21 May, 2006

1 commit


19 May, 2006

1 commit

  • Device node major/minor numbers are just stored in the payload of a single
    data node. Just extend that to 4 bytes and use new_encode_dev() for it.

    We only use the 4-byte format if we _need_ to, if !old_valid_dev(foo).
    This preserves backwards compatibility with older code as much as
    possible. If we do make devices with major or minor numbers above 255, and
    then mount the file system with the old code, it'll just read the first
    two bytes and get the numbers wrong. If it comes to garbage-collect it,
    it'll then write back those wrong numbers. But that's about the best we
    can expect.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

13 May, 2006

1 commit

  • This attached patches provide xattr support including POSIX-ACL and
    SELinux support on JFFS2 (version.5).

    There are some significant differences from previous version posted
    at last December.
    The biggest change is addition of EBS(Erase Block Summary) support.
    Currently, both kernel and usermode utility (sumtool) can recognize
    xattr nodes which have JFFS2_NODETYPE_XATTR/_XREF nodetype.

    In addition, some bugs are fixed.
    - A potential race condition was fixed.
    - Unexpected fail when updating a xattr by same name/value pair was fixed.
    - A bug when removing xattr name/value pair was fixed.

    The fundamental structures (such as using two new nodetypes and exclusion
    mechanism by rwsem) are unchanged. But most of implementation were reviewed
    and updated if necessary.
    Espacially, we had to change several internal implementations related to
    load_xattr_datum() to avoid a potential race condition.

    [1/2] xattr_on_jffs2.kernel.version-5.patch
    [2/2] xattr_on_jffs2.utils.version-5.patch

    Signed-off-by: KaiGai Kohei
    Signed-off-by: David Woodhouse

    KaiGai Kohei
     

29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

07 Nov, 2005

5 commits


06 Nov, 2005

1 commit

  • JFFS2 uses f->dents to store the pointer to the symlink target string (in case
    the inode is symlink). This is somewhat ugly to use the same field for
    different reasons. Introduce distinct field f->target for this purpose.
    Note, f->fragtree, f->dents, f->target may probably be put in a union.

    Signed-off-by: Artem B. Bityutskiy
    Signed-off-by: Thomas Gleixner

    Artem B. Bityutskiy
     

13 Jul, 2005

1 commit


06 Jul, 2005

1 commit