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

2 commits

  • * '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
     
  • This gives the filesystem more information about the writeback that
    is happening. Trond requested this for the NFS unstable write handling,
    and other filesystems might benefit from this too by beeing able to
    distinguish between the different callers in more detail.

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

    Christoph Hellwig
     

05 Mar, 2010

4 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
     
  • Currently various places in the VFS call vfs_dq_init directly. This means
    we tie the quota code into the VFS. Get rid of that and make the
    filesystem responsible for the initialization. For most metadata operations
    this is a straight forward move into the methods, but for truncate and
    open it's a bit more complicated.

    For truncate we currently only call vfs_dq_init for the sys_truncate case
    because open already takes care of it for ftruncate and open(O_TRUNC) - the
    new code causes an additional vfs_dq_init for those which is harmless.

    For open the initialization is moved from do_filp_open into the open method,
    which means it happens slightly earlier now, and only for regular files.
    The latter is fine because we don't need to initialize it for operations
    on special files, and we already do it as part of the namespace operations
    for directories.

    Add a dquot_file_open helper that filesystems that support generic quotas
    can use to fill in ->open.

    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
     
  • Currently clear_inode calls vfs_dq_drop directly. This means
    we tie the quota code into the VFS. Get rid of that and make the
    filesystem responsible for the drop inside the ->clear_inode
    superblock operation.

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

    Christoph Hellwig
     

04 Mar, 2010

1 commit


05 Feb, 2010

1 commit


15 Dec, 2009

1 commit

  • It is not very good to do IO in udf_clear_inode. First, VFS does not really
    expect inode to become dirty there and thus we have to write it ourselves,
    second, memory reclaim gets blocked waiting for IO when it does not really
    expect it, third, the IO pattern (e.g. on umount) resulting from writes in
    udf_clear_inode is bad and it slows down writing a lot.

    The reason why UDF needed to do IO in udf_clear_inode is that UDF standard
    mandates extent length to exactly match inode size. But when we allocate
    extents to a file or directory, we don't really know what exactly the final
    file size will be and thus temporarily set it to block boundary and later
    truncate it to exact length in udf_clear_inode. Now, this is changed to
    truncate to final file size in udf_release_file for regular files. For
    directories and symlinks, we do the truncation at the moment when learn
    what the final file size will be.

    Signed-off-by: Jan Kara

    Jan Kara
     

15 Sep, 2009

1 commit

  • So far we preallocated blocks also for directories but that brings a
    problem, when to get rid of preallocated blocks we don't need. So far
    we removed them in udf_clear_inode() which has a disadvantage that
    1) blocks are unavailable long after writing to a directory finished
    and thus one can get out of space unnecessarily early
    2) releasing blocks from udf_clear_inode is problematic because VFS
    does not expect us to redirty inode there and it also slows down
    memory reclaim.

    So preallocate blocks only for regular files where we can drop preallocation
    in udf_release_file.

    Signed-off-by: Jan Kara

    Jan Kara
     

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

9 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