08 May, 2013

1 commit

  • Faster kernel compiles by way of fewer unnecessary includes.

    [akpm@linux-foundation.org: fix fallout]
    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Kent Overstreet
    Cc: Zach Brown
    Cc: Felipe Balbi
    Cc: Greg Kroah-Hartman
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Rusty Russell
    Cc: Jens Axboe
    Cc: Asai Thambi S P
    Cc: Selvan Mani
    Cc: Sam Bradshaw
    Cc: Jeff Moyer
    Cc: Al Viro
    Cc: Benjamin LaHaise
    Reviewed-by: "Theodore Ts'o"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kent Overstreet
     

22 Jan, 2013

1 commit

  • This patch implements extent caching in case of file reading.
    While reading a file, currently, UDF reads metadata serially
    which takes a lot of time depending on the number of extents present
    in the file. Caching last accessd extent improves metadata read time.
    Instead of reading file metadata from start, now we read from
    the cached extent.

    This patch considerably improves the time spent by CPU in kernel mode.
    For example, while reading a 10.9 GB file using dd:
    Time before applying patch:
    11677022208 bytes (10.9GB) copied, 1529.748921 seconds, 7.3MB/s
    real 25m 29.85s
    user 0m 12.41s
    sys 15m 34.75s

    Time after applying patch:
    11677022208 bytes (10.9GB) copied, 1469.338231 seconds, 7.6MB/s
    real 24m 29.44s
    user 0m 15.73s
    sys 3m 27.61s

    [JK: Fix bh refcounting issues, simplify initialization]

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ashish Sangwan
    Signed-off-by: Bonggil Bak
    Signed-off-by: Jan Kara

    Namjae Jeon
     

13 Dec, 2012

3 commits


05 Oct, 2012

1 commit

  • Pull ext3 & udf fixes from Jan Kara:
    "Shortlog pretty much says it all.

    The interesting bits are UDF support for direct IO and ext3 fix for a
    long standing oops in data=journal mode."

    * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    jbd: Fix assertion failure in commit code due to lacking transaction credits
    UDF: Add support for O_DIRECT
    ext3: Replace 0 with NULL for pointer in super.c file
    udf: add writepages support for udf
    ext3: don't clear orphan list on ro mount with errors
    reiserfs: Make reiserfs_xattr_handlers static

    Linus Torvalds
     

03 Oct, 2012

1 commit

  • Pull user namespace changes from Eric Biederman:
    "This is a mostly modest set of changes to enable basic user namespace
    support. This allows the code to code to compile with user namespaces
    enabled and removes the assumption there is only the initial user
    namespace. Everything is converted except for the most complex of the
    filesystems: autofs4, 9p, afs, ceph, cifs, coda, fuse, gfs2, ncpfs,
    nfs, ocfs2 and xfs as those patches need a bit more review.

    The strategy is to push kuid_t and kgid_t values are far down into
    subsystems and filesystems as reasonable. Leaving the make_kuid and
    from_kuid operations to happen at the edge of userspace, as the values
    come off the disk, and as the values come in from the network.
    Letting compile type incompatible compile errors (present when user
    namespaces are enabled) guide me to find the issues.

    The most tricky areas have been the places where we had an implicit
    union of uid and gid values and were storing them in an unsigned int.
    Those places were converted into explicit unions. I made certain to
    handle those places with simple trivial patches.

    Out of that work I discovered we have generic interfaces for storing
    quota by projid. I had never heard of the project identifiers before.
    Adding full user namespace support for project identifiers accounts
    for most of the code size growth in my git tree.

    Ultimately there will be work to relax privlige checks from
    "capable(FOO)" to "ns_capable(user_ns, FOO)" where it is safe allowing
    root in a user names to do those things that today we only forbid to
    non-root users because it will confuse suid root applications.

    While I was pushing kuid_t and kgid_t changes deep into the audit code
    I made a few other cleanups. I capitalized on the fact we process
    netlink messages in the context of the message sender. I removed
    usage of NETLINK_CRED, and started directly using current->tty.

    Some of these patches have also made it into maintainer trees, with no
    problems from identical code from different trees showing up in
    linux-next.

    After reading through all of this code I feel like I might be able to
    win a game of kernel trivial pursuit."

    Fix up some fairly trivial conflicts in netfilter uid/git logging code.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (107 commits)
    userns: Convert the ufs filesystem to use kuid/kgid where appropriate
    userns: Convert the udf filesystem to use kuid/kgid where appropriate
    userns: Convert ubifs to use kuid/kgid
    userns: Convert squashfs to use kuid/kgid where appropriate
    userns: Convert reiserfs to use kuid and kgid where appropriate
    userns: Convert jfs to use kuid/kgid where appropriate
    userns: Convert jffs2 to use kuid and kgid where appropriate
    userns: Convert hpfs to use kuid and kgid where appropriate
    userns: Convert btrfs to use kuid/kgid where appropriate
    userns: Convert bfs to use kuid/kgid where appropriate
    userns: Convert affs to use kuid/kgid wherwe appropriate
    userns: On alpha modify linux_to_osf_stat to use convert from kuids and kgids
    userns: On ia64 deal with current_uid and current_gid being kuid and kgid
    userns: On ppc convert current_uid from a kuid before printing.
    userns: Convert s390 getting uid and gid system calls to use kuid and kgid
    userns: Convert s390 hypfs to use kuid and kgid where appropriate
    userns: Convert binder ipc to use kuids
    userns: Teach security_path_chown to take kuids and kgids
    userns: Add user namespace support to IMA
    userns: Convert EVM to deal with kuids and kgids in it's hmac computation
    ...

    Linus Torvalds
     

21 Sep, 2012

1 commit


06 Sep, 2012

1 commit

  • Add support for the O_DIRECT flag. There are two cases to deal with:

    1. Small files stored in the ICB (inode control block?): just return 0
    from the new udf_adinicb_direct_IO() handler to fall back to buffered
    I/O.

    2. Larger files, not stored in the ICB: nothing special here. Just call
    blockdev_direct_IO() from our new udf_direct_IO() handler and tidy up
    any blocks instantiated outside i_size on error. This is pretty
    standard. Factor error handling code out of udf_write_begin() into new
    function udf_write_failed() so it can also be called by udf_direct_IO().

    Also change the whitespace in udf_aops to make it a bit neater.

    Signed-off-by: Ian Abbott
    Signed-off-by: Jan Kara

    Ian Abbott
     

04 Sep, 2012

1 commit

  • Use mpage_writepages() instead of multiple calls to udf_writepage()
    to make performance higher.

    *Write Speed with writepage() =
    RecSize ReadSpeed WriteSpeed RanReadSpeed RanWriteSpeed
    10485760 0.00MB/sec 8.56MB/sec 0.00MB/sec 8.20MB/sec
    1048576 0.00MB/sec 8.57MB/sec 0.00MB/sec 6.42MB/sec
    524288 0.00MB/sec 8.59MB/sec 0.00MB/sec 5.24MB/sec
    262144 0.00MB/sec 8.59MB/sec 0.00MB/sec 4.17MB/sec
    131072 0.00MB/sec 8.53MB/sec 0.00MB/sec 3.32MB/sec
    65536 0.00MB/sec 8.49MB/sec 0.00MB/sec 2.31MB/sec

    *Write Speed with writepages()
    RecSize ReadSpeed WriteSpeed RanReadSpeed RanWriteSpeed
    10485760 0.00MB/sec 9.88MB/sec 0.00MB/sec 9.60MB/sec
    1048576 0.00MB/sec 9.95MB/sec 0.00MB/sec 7.52MB/sec
    524288 0.00MB/sec 9.98MB/sec 0.00MB/sec 6.16MB/sec
    262144 0.00MB/sec 9.90MB/sec 0.00MB/sec 4.98MB/sec
    131072 0.00MB/sec 9.89MB/sec 0.00MB/sec 3.78MB/sec
    65536 0.00MB/sec 9.81MB/sec 0.00MB/sec 2.50MB/sec

    There is about 1.4MB/sec speed improvement over 8.5MB/sec,
    which comes out around 16% improvement.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ashish Sangwan
    Signed-off-by: Jan Kara

    Namjae Jeon
     

15 Aug, 2012

1 commit

  • If the new size is larger than the old size and the old file data was
    stored in the ICB (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) and the
    new size still fits in the ICB, skip the call to udf_extend_file() as it
    does not handle this i_alloc_type value (it calls BUG()).

    Signed-off-by: Ian Abbott
    Signed-off-by: Jan Kara

    Ian Abbott
     

09 Jul, 2012

1 commit


06 May, 2012

1 commit

  • After we moved inode_sync_wait() from end_writeback() it doesn't make sense
    to call the function end_writeback() anymore. Rename it to clear_inode()
    which well says what the function really does - set I_CLEAR flag.

    Signed-off-by: Jan Kara
    Signed-off-by: Fengguang Wu

    Jan Kara
     

01 Mar, 2012

2 commits


10 Jan, 2012

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    ext2/3/4: delete unneeded includes of module.h
    ext{3,4}: Fix potential race when setversion ioctl updates inode
    udf: Mark LVID buffer as uptodate before marking it dirty
    ext3: Don't warn from writepage when readonly inode is spotted after error
    jbd: Remove j_barrier mutex
    reiserfs: Force inode evictions before umount to avoid crash
    reiserfs: Fix quota mount option parsing
    udf: Treat symlink component of type 2 as /
    udf: Fix deadlock when converting file from in-ICB one to normal one
    udf: Cleanup calling convention of inode_getblk()
    ext2: Fix error handling on inode bitmap corruption
    ext3: Fix error handling on inode bitmap corruption
    ext3: replace ll_rw_block with other functions
    ext3: NULL dereference in ext3_evict_inode()
    jbd: clear revoked flag on buffers before a new transaction started
    ext3: call ext3_mark_recovery_complete() when recovery is really needed

    Linus Torvalds
     

09 Jan, 2012

2 commits

  • During BKL removal in 2.6.38, conversion of files from in-ICB format to normal
    format got broken. We call ->writepage with i_data_sem held but udf_get_block()
    also acquires i_data_sem thus creating A-A deadlock.

    We fix the problem by dropping i_data_sem before calling ->writepage() which is
    safe since i_mutex still protects us against any changes in the file. Also fix
    pagelock - i_data_sem lock inversion in udf_expand_file_adinicb() by dropping
    i_data_sem before calling find_or_create_page().

    CC: stable@kernel.org
    Reported-by: Matthias Matiak
    Tested-by: Matthias Matiak
    Reviewed-by: Namjae Jeon
    Signed-off-by: Jan Kara

    Jan Kara
     
  • inode_getblk() always returned NULL and passed results in its parameters.
    Make the function return something useful - found block number.

    Signed-off-by: Jan Kara

    Jan Kara
     

04 Jan, 2012

1 commit

  • note re mount options: fmask and dmask are explicitly truncated to 12bit,
    UDF_INVALID_MODE just needs to be guaranteed to differ from any such value.
    And umask is used only in &= with umode_t, so we ignore other bits anyway.

    Signed-off-by: Al Viro

    Al Viro
     

03 Nov, 2011

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue:
    vfs: add d_prune dentry operation
    vfs: protect i_nlink
    filesystems: add set_nlink()
    filesystems: add missing nlink wrappers
    logfs: remove unnecessary nlink setting
    ocfs2: remove unnecessary nlink setting
    jfs: remove unnecessary nlink setting
    hypfs: remove unnecessary nlink setting
    vfs: ignore error on forced remount
    readlinkat: ensure we return ENOENT for the empty pathname for normal lookups
    vfs: fix dentry leak in simple_fill_super()

    Linus Torvalds
     

02 Nov, 2011

1 commit


01 Nov, 2011

2 commits

  • Just whitespace and argument alignment.
    Introduce some checkpatch warnings that deserve to be ignored.

    Reviewed-by: NamJae Jeon
    Signed-off-by: Joe Perches
    Signed-off-by: Jan Kara

    Joe Perches
     
  • Use the current logging styles.

    Convert a few printks that should have been udf_warn and udf_err.
    Coalesce formats. Add #define pr_fmt.
    Move an #include "udfdecls.h" above other includes in udftime.c
    so pr_fmt works correctly. Strip prefixes from conversions as appropriate.
    Reorder logging definitions in udfdecl.h

    Signed-off-by: Joe Perches
    Signed-off-by: Jan Kara

    Joe Perches
     

06 Oct, 2011

1 commit


25 Mar, 2011

1 commit

  • * 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block: (65 commits)
    Documentation/iostats.txt: bit-size reference etc.
    cfq-iosched: removing unnecessary think time checking
    cfq-iosched: Don't clear queue stats when preempt.
    blk-throttle: Reset group slice when limits are changed
    blk-cgroup: Only give unaccounted_time under debug
    cfq-iosched: Don't set active queue in preempt
    block: fix non-atomic access to genhd inflight structures
    block: attempt to merge with existing requests on plug flush
    block: NULL dereference on error path in __blkdev_get()
    cfq-iosched: Don't update group weights when on service tree
    fs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away
    block: Require subsystems to explicitly allocate bio_set integrity mempool
    jbd2: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
    jbd: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
    fs: make fsync_buffers_list() plug
    mm: make generic_writepages() use plugging
    blk-cgroup: Add unaccounted time to timeslice_used.
    block: fixup plugging stubs for !CONFIG_BLOCK
    block: remove obsolete comments for blkdev_issue_zeroout.
    blktrace: Use rq->cmd_flags directly in blk_add_trace_rq.
    ...

    Fix up conflicts in fs/{aio.c,super.c}

    Linus Torvalds
     

10 Mar, 2011

1 commit

  • Code has been converted over to the new explicit on-stack plugging,
    and delay users have been converted to use the new API for that.
    So lets kill off the old plugging along with aops->sync_page().

    Signed-off-by: Jens Axboe

    Jens Axboe
     

23 Feb, 2011

1 commit


07 Jan, 2011

4 commits

  • The udf_readdir(), udf_lookup(), udf_create(), udf_mknod(), udf_mkdir(),
    udf_rmdir(), udf_link(), udf_get_parent() and udf_unlink() seems already
    adequately protected by i_mutex held by VFS invoking calls. The udf_rename()
    instead should be already protected by lock_rename again by VFS. The
    udf_ioctl(), udf_fill_super() and udf_evict_inode() don't requires any further
    protection.

    This work was supported by a hardware donation from the CE Linux Forum.

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Jan Kara

    Alessio Igor Bogani
     
  • Replace bkl with the UDF_I(inode)->i_data_sem rw semaphore in
    udf_release_file(), udf_symlink(), udf_symlink_filler(), udf_get_block(),
    udf_block_map(), and udf_setattr(). The rule now is that any operation
    on regular file's or symlink's extents (or generally allocation information
    including goal block) needs to hold i_data_sem.

    This work was supported by a hardware donation from the CE Linux Forum.

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Jan Kara

    Alessio Igor Bogani
     
  • Superblock carries credentials (uid, gid, etc.) which are used as default
    values in __udf_read_inode() when media does not provide these. These
    credentials can change during remount so we protect them by a rwlock so that
    each inode gets a consistent set of credentials.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • udf_update_inode() does not need BKL since on-disk inode modifications are
    protected by the buffer lock and reading of values of in-memory inode is
    safe without any lock. In some cases we can write inconsistent inode state
    to disk but in that case inode will be marked dirty and overwritten later.

    Also make unnecessarily global udf_sync_inode() static.

    Signed-off-by: Jan Kara

    Jan Kara
     

10 Aug, 2010

2 commits


24 May, 2010

1 commit

  • Quota on UDF is non-functional at least since 2.6.16 (I'm too lazy to
    do more archeology) because it does not provide .quota_write and .quota_read
    functions and thus quotaon(8) just returns EINVAL. Since nobody complained
    for all those years and quota support is not even in UDF standard just nuke
    it.

    Signed-off-by: Jan Kara

    Jan Kara
     

08 Apr, 2010

1 commit


13 Mar, 2010

1 commit


10 Mar, 2010

2 commits

  • We needlessly read inode in udf_update_inode just before zeroing out the
    contents of the buffer. Fix it.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • Writing of inode holding unallocated space info was broken because we first
    cleared the buffer and after that checked whether it contains a tag meaning the
    block holds unallocated space information. Fix the problem by checking
    appropriate in memory flag instead.

    Also cleanup the function a bit along the way - most importantly lock buffer
    when modifying its contents, check for buffer_write_io_error instead of
    !buffer_uptodate, etc..

    Signed-off-by: Jan Kara

    Jan Kara
     

08 Mar, 2010

1 commit


06 Mar, 2010

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (33 commits)
    quota: stop using QUOTA_OK / NO_QUOTA
    dquot: cleanup dquot initialize routine
    dquot: move dquot initialization responsibility into the filesystem
    dquot: cleanup dquot drop routine
    dquot: move dquot drop responsibility into the filesystem
    dquot: cleanup dquot transfer routine
    dquot: move dquot transfer responsibility into the filesystem
    dquot: cleanup inode allocation / freeing routines
    dquot: cleanup space allocation / freeing routines
    ext3: add writepage sanity checks
    ext3: Truncate allocated blocks if direct IO write fails to update i_size
    quota: Properly invalidate caches even for filesystems with blocksize < pagesize
    quota: generalize quota transfer interface
    quota: sb_quota state flags cleanup
    jbd: Delay discarding buffers in journal_unmap_buffer
    ext3: quota_write cross block boundary behaviour
    quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota
    quota: split out compat_sys_quotactl support from quota.c
    quota: split out netlink notification support from quota.c
    quota: remove invalid optimization from quota_sync_all
    ...

    Fixed trivial conflicts in fs/namei.c and fs/ufs/inode.c

    Linus Torvalds