02 Apr, 2009

4 commits


28 Nov, 2008

1 commit

  • udf_clear_inode() can leave behind buffers on mapping's i_private list (when
    we truncated preallocation). Call invalidate_inode_buffers() so that the list
    is properly cleaned-up before we return from udf_clear_inode(). This is ugly
    and suggest that we should cleanup preallocation earlier than in clear_inode()
    but currently there's no such call available since drop_inode() is called under
    inode lock and thus is unusable for disk operations.

    Signed-off-by: Jan Kara

    Jan Kara
     

17 Apr, 2008

10 commits


09 Feb, 2008

10 commits

  • When adding directory entry to a directory, we have to properly increase
    length of the last extent. Handle this similarly as extending regular files -
    make extents always have size multiple of block size (it will be truncated
    down to proper size in udf_clear_inode()).

    Signed-off-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Position in directory returned by readdir is offset of directory entry divided
    by four (don't ask me why). Make this conversion only when reading f_pos from
    userspace / writing it there and internally work in bytes. It makes things
    more easily readable and also fixes a bug (we forgot to divide length of the
    entry by 4 when advancing f_pos in udf_add_entry()).

    Signed-off-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Fix udf_clear_inode() to request asynchronous writeout in icache reclaim
    path.

    Signed-off-by: Mike Galbraith
    Acked-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Galbraith
     
  • sparse generated:
    fs/udf/inode.c:324:41: warning: incorrect type in argument 4 (different signedness)
    fs/udf/inode.c:324:41: expected long *
    fs/udf/inode.c:324:41: got unsigned long *

    inode_getblk always set 4th argument to uint32_t value
    3rd parameter of map_bh is sector_t (which is unsigned long or u64)
    so convert phys value to sector_t

    fs/udf/inode.c:1818:47: warning: incorrect type in argument 3 (different signedness)
    fs/udf/inode.c:1818:47: expected int *
    fs/udf/inode.c:1818:47: got unsigned int *
    fs/udf/inode.c:1826:46: warning: incorrect type in argument 3 (different signedness)
    fs/udf/inode.c:1826:46: expected int *
    fs/udf/inode.c:1826:46: got unsigned int *

    udf_get_filelongad and udf_get_shortad are called always for uint32_t
    values (struct extent_position->offset), so it's safe to convert offset
    parameter to uint32_t

    gcc warned:
    fs/udf/inode.c: In function 'udf_get_block':
    fs/udf/inode.c:299: warning: 'phys' may be used uninitialized in this function
    initialize it to 0 (if someday someone will break inode_getblk we will catch it immediately)

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

    Marcin Slusarz
     
  • 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
     
  • convert byte order of constant instead of variable,
    which can be done at compile time (vs run time)

    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
     

17 Oct, 2007

1 commit

  • Convert udf to new aops. Also seem to have fixed pagecache corruption in
    udf_adinicb_commit_write -- page was marked uptodate when it is not. Also,
    fixed the silly setup where prepare_write was doing a kmap to be used in
    commit_write: just do kmap_atomic in write_end. Use libfs helpers to make
    this easier.

    Signed-off-by: Nick Piggin
    Cc:
    Cc: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

01 Aug, 2007

1 commit

  • This patch fix weird behaviour of UDF mounting procedure. To get UID
    changed (for now) we have to type

    mount -t udf -o uid=some_user,uid=ignore /dev/device /mnt/moun_point

    and specifying two uid at once is strange a bit. So with the patch we are
    able to mount without additional 'uid=ignore' option. The same for GID
    option is done.

    This patch will not break current mount scheme (with two option).

    Btw this does fix (I hope) the following

    [BUG 6124] mount of UDF fs ignores UID and GID options
    http://bugzilla.kernel.org/show_bug.cgi?id=6124

    Signed-off-by: Cyrill Gorcunov
    Cc: Jan Kara
    Cc: Michael
    Cc: Eric Sandeen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cyrill Gorcunov
     

22 Jul, 2007

1 commit


20 Jul, 2007

1 commit


17 Jul, 2007

1 commit

  • This patch adds checking for granted memory while filling up inode data to
    prevent possible NULL pointer usage. If there is not enough memory to fill
    inode data we just mark it as "bad". Also some whitespace cleanup.

    Signed-off-by: Cyrill Gorcunov
    Cc: Jan Kara
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cyrill Gorcunov
     

17 Jun, 2007

1 commit

  • We have to take care that when we call udf_discard_prealloc() from
    udf_clear_inode() we have to write inode ourselves afterwards (otherwise,
    some changes might be lost leading to leakage of blocks, use of free blocks
    or improperly aligned extents).

    Also udf_discard_prealloc() does two different things - it removes
    preallocated blocks and truncates the last extent to exactly match i_size.
    We move the latter functionality to udf_truncate_tail_extent(), call
    udf_discard_prealloc() when last reference to a file is dropped and call
    udf_truncate_tail_extent() when inode is being removed from inode cache
    (udf_clear_inode() call).

    We cannot call udf_truncate_tail_extent() earlier as subsequent open+write
    would find the last block of the file mapped and happily write to the end
    of it, although the last extent says it's shorter.

    [akpm@linux-foundation.org: Make checkpatch.pl happier]
    Signed-off-by: Jan Kara
    Cc: Eric Sandeen
    Cc: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     

01 Jun, 2007

1 commit

  • update_next_aext() could possibly rewrite values in elen and eloc, possibly
    leading to data corruption when rewriting a file. Use temporary variables
    instead. Also advance cur_epos as it can also point to an indirect extent
    pointer.

    Signed-off-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     

09 May, 2007

4 commits

  • Make UDF work correctly for files larger than 1GB. As no extent can be
    longer than (1<
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Make UDF use get_bh() instead of directly accessing b_count and use
    brelse() instead of udf_release_data() which does just brelse()...

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

    Jan Kara
     
  • Introduce a structure extent_position to store a position of an extent and
    the corresponding buffer_head in one place.

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

    Jan Kara
     
  • Use sector_t and loff_t for file offsets in UDF filesystem. Otherwise an
    overflow may occur for long files. Also make inode_bmap() return offset in
    the extent in number of blocks instead of number of bytes - for most
    callers this is more convenient.

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

    Jan Kara
     

01 Oct, 2006

1 commit


27 Sep, 2006

1 commit

  • This eliminates the i_blksize field from struct inode. Filesystems that want
    to provide a per-inode st_blksize can do so by providing their own getattr
    routine instead of using the generic_fillattr() function.

    Note that some filesystems were providing pretty much random (and incorrect)
    values for i_blksize.

    [bunk@stusta.de: cleanup]
    [akpm@osdl.org: generic_fillattr() fix]
    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Ts'o
     

29 Jun, 2006

1 commit


02 Apr, 2006

1 commit