14 Dec, 2015

1 commit

  • Change the list operation to only return whether or not an attribute
    should be listed. Copying the attribute names into the buffer is moved
    to the callers.

    Since the result only depends on the dentry and not on the attribute
    name, we do not pass the attribute name to list operations.

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     

14 Nov, 2015

1 commit

  • The xattr_handler operations are currently all passed a file system
    specific flags value which the operations can use to disambiguate between
    different handlers; some file systems use that to distinguish the xattr
    namespace, for example. In some oprations, it would be useful to also have
    access to the handler prefix. To allow that, pass a pointer to the handler
    to operations instead of the flags value alone.

    Signed-off-by: Andreas Gruenbacher
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     

27 Apr, 2015

1 commit

  • Pull fourth vfs update from Al Viro:
    "d_inode() annotations from David Howells (sat in for-next since before
    the beginning of merge window) + four assorted fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    RCU pathwalk breakage when running into a symlink overmounting something
    fix I_DIO_WAKEUP definition
    direct-io: only inc/dec inode->i_dio_count for file systems
    fs/9p: fix readdir()
    VFS: assorted d_backing_inode() annotations
    VFS: fs/inode.c helpers: d_inode() annotations
    VFS: fs/cachefiles: d_backing_inode() annotations
    VFS: fs library helpers: d_inode() annotations
    VFS: assorted weird filesystems: d_inode() annotations
    VFS: normal filesystems (and lustre): d_inode() annotations
    VFS: security/: d_inode() annotations
    VFS: security/: d_backing_inode() annotations
    VFS: net/: d_inode() annotations
    VFS: net/unix: d_backing_inode() annotations
    VFS: kernel/: d_inode() annotations
    VFS: audit: d_backing_inode() annotations
    VFS: Fix up some ->d_inode accesses in the chelsio driver
    VFS: Cachefiles should perform fs modifications on the top layer only
    VFS: AF_UNIX sockets should call mknod on the top layer only

    Linus Torvalds
     

23 Apr, 2015

1 commit

  • Pull MTD updates from Brian Norris:
    "Common MTD:

    - Add Kconfig option for keeping both the 'master' and 'partition'
    MTDs registered as devices. This would really make a better
    default if we could do it over, as it allows a lot more flexibility
    in (1) determining the flash topology of the system from user-space
    and (2) adding temporary partitions at runtime (ioctl(BLKPG)).

    Unfortunately, this would possibly cause user-space breakage, as it
    will cause renumbering of the /dev/mtdX devices. We'll see if we
    can change this in the future, as there have already been a few
    people looking for this feature, and I know others have just been
    working around our current limitations instead of fixing them this
    way.

    - Along with the previous change, add some additional information to
    sysfs, so user-space can read the offset of each partition within
    its master device

    SPI NOR:

    - add new device tree compatible binding to represent the
    mostly-compatible class of SPI NOR flash which can be detected by
    their extended JEDEC ID bytes, cutting down the duplication of our
    ID tables

    - misc. new IDs

    Various other miscellaneous fixes and changes"

    * tag 'for-linus-20150422' of git://git.infradead.org/linux-mtd: (53 commits)
    mtd: spi-nor: Add support for Macronix mx25u6435f serial flash
    mtd: spi-nor: Add support for Winbond w25q64dw serial flash
    mtd: spi-nor: add support for the Winbond W25X05 flash
    mtd: spi-nor: support en25s64 device
    mtd: m25p80: bind to "nor-jedec" ID, for auto-detection
    Documentation: devicetree: m25p80: add "nor-jedec" binding
    mtd: Make MTD tests cancelable
    mtd: mtd_oobtest: Fix bitflip_limit usage in test case 3
    mtd: docg3: remove invalid __exit annotations
    mtd: fsl_ifc_nand: use msecs_to_jiffies for time conversion
    mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
    mtd: atmel_nand: add a definition for the oob reserved bytes
    mtd: part: Remove partition overlap checks
    mtd: part: Add sysfs variable for offset of partition
    mtd: part: Create the master device node when partitioned
    mtd: ts5500_flash: Fix typo in MODULE_DESCRIPTION in ts5500_flash.c
    mtd: denali: Disable sub-page writes in Denali NAND driver
    mtd: pxa3xx_nand: cleanup wait_for_completion handling
    mtd: nand: gpmi: Check for scan_bbt() error
    mtd: nand: gpmi: fixup return type of wait_for_completion_timeout
    ...

    Linus Torvalds
     

16 Apr, 2015

1 commit


31 Mar, 2015

1 commit


07 Mar, 2015

1 commit


03 Jul, 2014

1 commit


26 Jan, 2014

1 commit


14 May, 2012

2 commits

  • Unlike file data integrity the xattr data integrity was not checked
    before some explicit access to the attribute was made.

    This could leave in the system a number of corrupted extended attributes
    which will be detected only at access time and possibly at a very late
    time compared to the time the corruption actually happened.

    This patch adds the ability to check for extended attribute integrity
    on first GC scan pass (similar to file data integrity check). This allows
    for all present attributes to be completly verified before any use of them.

    In order to work correctly this patch also needs the patch allowing
    JFFS2 to discriminate between recoverable and non recoverable errors
    on extended attributes.

    Signed-off-by: Jean-Christophe DUBOIS
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Jean-Christophe DUBOIS
     
  • This patch is basically a revert of commit f326966b3df47f4fa7e90425f60efdd30c31fe19.

    It allows JFFS2 to make the distinction between a potential transient
    error (reading or writing the media) and a non recoverable error like a
    bad CRC on the extended attribute data or some insconsitent parameters.

    In order to make clear that the error is indeed intended to report a
    corrupted attribute, a new local error code (JFFS2_XATTR_IS_CORRUPTED)
    is introduced rather than returning a confusing positive EIO, which is
    what led to the inappropriate "fix" last time.

    This error code is never reported to user space and only checked locally
    in this file.

    Signed-off-by: Jean-Christophe DUBOIS
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Jean-Christophe DUBOIS
     

27 Mar, 2012

1 commit

  • Use pr_ to prefix KBUILD_MODNAME via pr_fmt.

    Remove obfuscating defines and use constants in pr_
    No need for a do {} while (0) for single statements.

    Form of JFFS_ output changes from
    "JFFS2 notice: " to "jffs2: notice: "

    Added pr_fmt to xattr.c

    Signed-off-by: Joe Perches
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Joe Perches
     

11 Mar, 2011

1 commit


04 Dec, 2010

1 commit

  • do_verify_xattr_datum(), do_load_xattr_datum(), load_xattr_datum()
    and verify_xattr_ref() should return negative value on error.
    Sometimes they return EIO that is positive. Change this to -EIO.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Vasiliy Kulikov
     

10 Aug, 2010

1 commit


22 Jul, 2010

1 commit


22 May, 2010

1 commit


17 Dec, 2009

1 commit

  • Add a flags argument to struct xattr_handler and pass it to all xattr
    handler methods. This allows using the same methods for multiple
    handlers, e.g. for the ACL methods which perform exactly the same action
    for the access and default ACLs, just using a different underlying
    attribute. With a little more groundwork it'll also allow sharing the
    methods for the regular user/trusted/secure handlers in extN, ocfs2 and
    jffs2 like it's already done for xfs in this patch.

    Also change the inode argument to the handlers to a dentry to allow
    using the handlers mechnism for filesystems that require it later,
    e.g. cifs.

    [with GFS2 bits updated by Steven Whitehouse ]

    Signed-off-by: Christoph Hellwig
    Reviewed-by: James Morris
    Acked-by: Joel Becker
    Signed-off-by: Al Viro

    Christoph Hellwig
     

04 Dec, 2009

1 commit

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     

02 May, 2008

2 commits

  • * git://git.infradead.org/mtd-2.6:
    [MTD][NOR] Add physical address to point() method
    [JFFS2] Track parent inode for directories (for NFS export)
    [JFFS2] Invert last argument of jffs2_gc_fetch_inode(), make it boolean.
    [JFFS2] Quiet lockdep false positive.
    [JFFS2] Clean up jffs2_alloc_inode() and jffs2_i_init_once()
    [MTD] Delete long-unused jedec.h header file.
    [MTD] [NAND] at91_nand: use at91_nand_{en,dis}able consistently.

    Linus Torvalds
     
  • To support NFS export, we need to know the parent inode of directories.
    Rather than growing the jffs2_inode_cache structure, share space with
    the nlink field -- which was always set to 1 for directories anyway.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

30 Apr, 2008

1 commit


20 May, 2007

2 commits

  • An xattr_datum which ends up orphaned should be freed by the GC
    thread. But if we umount before the GC thread is finished, or if we
    mount read-only and the GC thread never runs, they might never be
    freed. Clean them up during unmount, if there are any left.

    Signed-off-by: David Woodhouse

    David Woodhouse
     
  • When we cannot mark nodes as obsolete, such as on NAND flash, we end up
    having to delete inodes with !nlink in jffs2_build_remove_unlinked_inode().
    However, jffs2_build_xattr_subsystem() runs later than this, and will
    attach an xref to the dead inode. Then later when the last nodes of that
    dead inode are erased we hit a BUG() in jffs2_del_ino_cache()
    because we're not supposed to get there with an xattr still attached to
    the inode which is being killed.

    The simple fix is to refrain from attaching xattrs to inodes with zero
    nlink, in jffs2_build_xattr_subsystem(). It's it's OK to trust nlink
    here because the file system isn't actually mounted yet, so there's no
    chance that a zero-nlink file could actually be alive still because
    it's open.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

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
     

04 Oct, 2006

1 commit

  • gcc emits the following warning on a 'allmodconfig' build:

    fs/jffs2/xattr.c: In function ‘unrefer_xattr_datum’:
    fs/jffs2/xattr.c:402: warning: unused variable ‘version’
    fs/jffs2/xattr.c:402: warning: unused variable ‘xid’

    Given that these variables are only used in the debug printk, and they
    merely remove a deref, we can easily kill the warning by adding the
    derefs to the debug printk.

    Signed-off-by: Jeff Garzik
    Signed-off-by: David Woodhouse

    Jeff Garzik
     

16 Aug, 2006

1 commit


29 Jun, 2006

1 commit

  • When xd->refcnt is checked whether this xdatum should be released
    or not, atomic_dec_and_lock() is used to ensure holding the
    c->erase_completion_lock.

    This fix change a specification of delete_xattr_datum().
    Previously, it's only called when xd->refcnt equals zero.
    (calling it with positive xd->refcnt cause a BUG())
    If you applied this patch, the function checks whether
    xd->refcnt is zero or not under the spinlock if necessary.
    Then, it marks xd DEAD flahs and links with xattr_dead_list
    or releases it immediately when xd->refcnt become zero.

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

    KaiGai Kohei
     

27 Jun, 2006

3 commits

  • In jffs2_release_xattr_datum(), it refers xd->refcnt to ensure
    whether releasing xd is allowed or not.
    But we can't hold xattr_sem since this function is called under
    spin_lock(&c->erase_completion_lock). Thus we have to refer it
    without any locking.

    This patch redefine xd->refcnt as atomic_t. It enables to refer
    xd->refcnt without any locking.

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

    KaiGai Kohei
     
  • In the followinf situation, an explicit delete marker is not
    necessary, because we can certainlly detect those obsolete
    xattr_datum or xattr_ref on next mounting.

    - When to delete xattr_datum node.
    - When to delete xattr_ref node on removing inode.
    - When to delete xattr_ref node on updating xattr.

    This patch rids writing delete marker in those situations.

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

    KaiGai Kohei
     
  • - When xdatum is removed, a new xdatum with 'delete marker' is
    written. (version==0xffffffff means 'delete marker')
    - When xref is removed, a new xref with 'delete marker' is written.
    (odd-numbered xseqno means 'delete marker')

    - delete_xattr_(datum/xref)_delay() are new deletion functions
    are added. We can only use them if we can detect the target
    obsolete xdatum/xref as a orphan or errir one.
    (e.g when inode deletion, or detecting crc error)

    [1/3] jffs2-xattr-v6-01-delete_marker.patch

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

    KaiGai Kohei
     

25 May, 2006

1 commit


24 May, 2006

1 commit

  • As the first step towards eliminating the ref->next_phys member and saving
    memory by using an _array_ of struct jffs2_raw_node_ref per eraseblock,
    stop the write functions from allocating their own refs; have them just
    _reserve_ the appropriate number instead. Then jffs2_link_node_ref() can
    just fill them in.

    Use a linked list of pre-allocated refs in the superblock, for now. Once
    we switch to an array, it'll just be a case of extending that array.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

23 May, 2006

1 commit


22 May, 2006

1 commit


21 May, 2006

1 commit


13 May, 2006

4 commits