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
     

07 Jan, 2011

1 commit


10 Aug, 2010

1 commit


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
     

22 May, 2010

1 commit


05 Mar, 2010

3 commits

  • Get rid of the initialize dquot operation - it is now always called from
    the filesystem and if a filesystem really needs it's own (which none
    currently does) it can just call into it's own routine directly.

    Rename the now static low-level dquot_initialize helper to __dquot_initialize
    and vfs_dq_init to dquot_initialize to have a consistent namespace.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     
  • Get rid of the drop dquot operation - it is now always called from
    the filesystem and if a filesystem really needs it's own (which none
    currently does) it can just call into it's own routine directly.

    Rename the now static low-level dquot_drop helper to __dquot_drop
    and vfs_dq_drop to dquot_drop to have a consistent namespace.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     
  • Get rid of the alloc_inode and free_inode dquot operations - they are
    always called from the filesystem and if a filesystem really needs
    their own (which none currently does) it can just call into it's
    own routine directly.

    Also get rid of the vfs_dq_alloc/vfs_dq_free wrappers and always
    call the lowlevel dquot_alloc_inode / dqout_free_inode routines
    directly, which now lose the number argument which is always 1.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     

02 Apr, 2009

2 commits

  • We update information in logical volume integrity descriptor after each
    allocation (as LVID contains free space, number of directories and files on
    disk etc.). If the filesystem is on some phase change media, this leads to its
    quick degradation as such media is able to handle only 10000 overwrites or so.
    We solve the problem by writing new information into LVID only on umount,
    remount-ro and sync. This solves the problem at the price of longer media
    inconsistency (previously media became consistent after pdflush flushed dirty
    LVID buffer) but that should be acceptable.

    Report by and patch written in cooperation with
    Rich Coe .

    Signed-off-by: Jan Kara

    Jan Kara
     
  • Signed-off-by: Pekka Enberg
    Signed-off-by: Jan Kara

    Pekka Enberg
     

26 Mar, 2009

1 commit


14 Nov, 2008

1 commit

  • Wrap access to task credentials so that they can be separated more easily from
    the task_struct during the introduction of COW creds.

    Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

    Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
    sense to use RCU directly rather than a convenient wrapper; these will be
    addressed by later patches.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Acked-by: Serge Hallyn
    Acked-by: Jan Kara
    Signed-off-by: James Morris

    David Howells
     

19 Aug, 2008

2 commits

  • I case we failed to allocate memory for inode when creating it, we did not
    properly free block already allocated for this inode. Move memory allocation
    before the block allocation which fixes this issue (thanks for the idea go to
    Ingo Oeser ). Also remove a few superfluous
    initializations already done in udf_alloc_inode().

    Reviewed-by: Ingo Oeser
    Signed-off-by: Jan Kara

    Jan Kara
     
  • A memory allocation inside alloc_mutex must not recurse back into the
    filesystem itself because that leads to lock inversion between iprune_mutex and
    alloc_mutex (and thus to deadlocks - see traces below). alloc_mutex is actually
    needed only to update allocation statistics in the superblock so we can drop it
    before we start allocating memory for the inode.

    tar D ffff81015b9c8c90 0 6614 6612
    ffff8100d5a21a20 0000000000000086 0000000000000000 00000000ffff0000
    ffff81015b9c8c90 ffff81015b8f0cd0 ffff81015b9c8ee0 0000000000000000
    0000000000000003 0000000000000000 0000000000000000 0000000000000000
    Call Trace:
    [] __mutex_lock_slowpath+0x64/0x9b
    [] mutex_lock+0xa/0xb
    [] shrink_icache_memory+0x38/0x200
    [] shrink_slab+0xe3/0x15b
    [] try_to_free_pages+0x221/0x30d
    [] isolate_pages_global+0x0/0x31
    [] __alloc_pages_internal+0x252/0x3ab
    [] cache_alloc_refill+0x22e/0x47b
    [] kmem_cache_alloc+0x3b/0x61
    [] cache_alloc_refill+0x2fe/0x47b
    [] __kmalloc+0x76/0x9c
    [] :udf:udf_new_inode+0x202/0x2e2
    [] :udf:udf_create+0x2f/0x16d
    [] :udf:udf_lookup+0xa6/0xad
    ...
    kswapd0 D ffff81015b9d9270 0 125 2
    ffff81015b903c28 0000000000000046 ffffffff8028cbb0 00000000fffffffb
    ffff81015b9d9270 ffff81015b8f0cd0 ffff81015b9d94c0 000000000271b490
    ffffe2000271b458 ffffe2000271b420 ffffe20002728dc8 ffffe20002728d90
    Call Trace:
    [] __set_page_dirty+0xeb/0xf5
    [] get_dirty_limits+0x1d/0x22f
    [] __mutex_lock_slowpath+0x64/0x9b
    [] mutex_lock+0xa/0xb
    [] :udf:udf_bitmap_free_blocks+0x47/0x1eb
    [] :udf:udf_discard_prealloc+0xc6/0x172
    [] :udf:udf_clear_inode+0x1e/0x48
    [] clear_inode+0x6d/0xc4
    [] dispose_list+0x56/0xee
    [] shrink_icache_memory+0x1d0/0x200
    [] shrink_slab+0xe3/0x15b
    [] kswapd+0x346/0x447
    ...

    Reported-by: Tibor Tajti
    Reviewed-by: Ingo Oeser
    Signed-off-by: Jan Kara

    Jan Kara
     

17 Apr, 2008

2 commits

  • replace all:
    little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
    expression_in_cpu_byteorder);
    with:
    leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
    sparse didn't generate any new warning with this patch

    Signed-off-by: Marcin Slusarz

    marcin.slusarz@gmail.com
     
  • There's really no reason to keep udf headers in include/linux as they're
    not used by anything but fs/udf/.

    This patch merges most of include/linux/udf_fs_i.h into fs/udf/udf_i.h,
    include/linux/udf_fs_sb.h into fs/udf/udf_sb.h and
    include/linux/udf_fs.h into fs/udf/udfdecl.h.

    The only thing remaining in include/linux/ is a stub of udf_fs_i.h
    defining the four user-visible udf ioctls. It's also moved from
    unifdef-y to headers-y because it can be included unconditionally now.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     

09 Feb, 2008

4 commits

  • cache UDF_I(struct inode *) return values when there are
    at least 2 uses in one function

    Signed-off-by: Marcin Slusarz
    Acked-by: Jan Kara
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     
  • Signed-off-by: Marcin Slusarz
    Acked-by: Jan Kara
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     
  • fix coding style errors found by checkpatch:
    - assignments in if conditions
    - braces {} around single statement blocks
    - no spaces after commas
    - printks without KERN_*
    - lines longer than 80 characters
    - spaces between "type *" and variable name

    before: 192 errors, 561 warnings, 8987 lines checked
    after: 1 errors, 38 warnings, 9468 lines checked

    Signed-off-by: Marcin Slusarz
    Cc: Jan Kara
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     
  • remove macros:
    - UDF_SB_PARTMAPS
    - UDF_SB_PARTTYPE
    - UDF_SB_PARTROOT
    - UDF_SB_PARTLEN
    - UDF_SB_PARTVSN
    - UDF_SB_PARTNUM
    - UDF_SB_TYPESPAR
    - UDF_SB_TYPEVIRT
    - UDF_SB_PARTFUNC
    - UDF_SB_PARTFLAGS
    - UDF_SB_VOLIDENT
    - UDF_SB_NUMPARTS
    - UDF_SB_PARTITION
    - UDF_SB_SESSION
    - UDF_SB_ANCHOR
    - UDF_SB_LASTBLOCK
    - UDF_SB_LVIDBH
    - UDF_SB_LVID
    - UDF_SB_UMASK
    - UDF_SB_GID
    - UDF_SB_UID
    - UDF_SB_RECORDTIME
    - UDF_SB_SERIALNUM
    - UDF_SB_UDFREV
    - UDF_SB_FLAGS
    - UDF_SB_VAT
    - UDF_UPDATE_UDFREV
    - UDF_SB_FREE
    and open code them

    convert UDF_SB_LVIDIU macro to udf_sb_lvidiu function

    rename some struct udf_sb_info fields:
    - s_volident to s_volume_ident
    - s_lastblock to s_last_block
    - s_lvidbh to s_lvid_bh
    - s_recordtime to s_record_time
    - s_serialnum to s_serial_number;
    - s_vat to s_vat_inode;

    Signed-off-by: Marcin Slusarz
    Cc: Ben Fennema
    Cc: Jan Kara
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     

22 Jul, 2007

1 commit


20 Jul, 2007

1 commit


17 Jul, 2007

1 commit


27 Sep, 2006

2 commits


06 Aug, 2006

1 commit

  • I saw an oops down this path when trying to create a new file on a UDF
    filesystem which was internally marked as readonly, but mounted rw:

    udf_create
    udf_new_inode
    new_inode
    alloc_inode
    udf_alloc_inode
    udf_new_block
    returns EIO due to readonlyness
    iput (on error)
    udf_put_inode
    udf_discard_prealloc
    udf_next_aext
    udf_current_aext
    udf_get_fileshortad
    OOPS

    the udf_discard_prealloc() path was examining uninitialized fields of the
    udf inode.

    udf_discard_prealloc() already has this code to short-circuit the discard
    path if no extents are preallocated:

    if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB ||
    inode->i_size == UDF_I_LENEXTENTS(inode))
    {
    return;
    }

    so if we initialize UDF_I_LENEXTENTS(inode) = 0 earlier in udf_new_inode,
    we won't try to free the (not) preallocated blocks, since this will match
    the i_size = 0 set when the inode was initialized.

    Signed-off-by: Eric Sandeen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     

23 Mar, 2006

1 commit

  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

03 Jan, 2006

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds