10 Oct, 2007

1 commit

  • This is the filesystem part of the patches to fix this bz. There are
    additional userland patches (gfs2_quota, libgfs2) for the complete
    solution. This patch adds a new field qu_ll_next to the gfs2_quota
    structure. This field allows us to create linked lists of quotas in the
    ondisk quota inode. Instead of scanning through the entire sparse quota
    file for valid quotas, we can now simply walk through the user and group
    quota linked lists to perform the do_list operation.

    Signed-off-by: Abhijith Das
    Signed-off-by: Steven Whitehouse

    Abhijith Das
     

09 Jul, 2007

6 commits

  • This adds a nanosecond timestamp feature to the GFS2 filesystem. Due
    to the way that the on-disk format works, older filesystems will just
    appear to have this field set to zero. When mounted by an older version
    of GFS2, the filesystem will simply ignore the extra fields so that
    it will again appear to have whole second resolution, so that its
    trivially backward compatible.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • This patch fixes some sign issues which were accidentally introduced
    into the quota & statfs code during the endianess annotation process.
    Also included is a general clean up which moves all of the _host
    structures out of gfs2_ondisk.h (where they should not have been to
    start with) and into the places where they are actually used (often only
    one place). Also those _host structures which are not required any more
    are removed entirely (which is the eventual plan for all of them).

    The conversion routines from ondisk.c are also moved into the places
    where they are actually used, which for almost every one, was just one
    single place, so all those are now static functions. This also cleans up
    the end of gfs2_ondisk.h which no longer needs the #ifdef __KERNEL__.

    The net result is a reduction of about 100 lines of code, many functions
    now marked static plus the bug fixes as mentioned above. For good
    measure I ran the code through sparse after making these changes to
    check that there are no warnings generated.

    This fixes Red Hat bz #239686

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • This patch fixes a bug where gfs2 was writing update quota usage
    information to the wrong location in the quota file.

    Signed-off-by: Abhijith Das
    Signed-off-by: Steven Whitehouse

    Abhijith Das
     
  • 2e8701a15cd6f7c95e74d6660615a69b09e453ef commit breaks libgfs2 build:

    gcc -Wall -I/usr/src/ubuntu/mypkgs/rhcluster/cluster/config -DHELPER_PROGRAM
    -D_FILE_OFFSET_BITS=64 -DGFS2_RELEASE_NAME=\"2.0\" -ggdb -I/usr/include
    -I../include -I../libgfs2 -c -o gfs2hex.o gfs2hex.c
    In file included from hexedit.h:22,
    from gfs2hex.c:27:
    /usr/include/linux/gfs2_ondisk.h:505: error: expected specifier-qualifier-list
    before ‘u32’
    make[2]: *** [gfs2hex.o] Error 1
    make[2]: Leaving directory `/usr/src/ubuntu/mypkgs/rhcluster/cluster/gfs2/edit'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/ubuntu/mypkgs/rhcluster/cluster/gfs2'
    make: *** [gfs2] Error 2

    Signed-off-by: Fabio Massimo Di Nitto
    Signed-off-by: Steven Whitehouse

    Fabio Massimo Di Nitto
     
  • This patch fixes an error in the quota code where a 'struct
    gfs2_quota_lvb*' was being passed to gfs2_adjust_quota() instead of a
    'struct gfs2_quota_data*'. Also moved 'struct gfs2_quota_lvb' from
    fs/gfs2/incore.h to include/linux/gfs2_ondisk.h as per Steve's suggestion.

    Signed-off-by: Abhijith Das
    Signed-off-by: Steven Whitehouse

    Abhijith Das
     
  • This patch cleans up the inode number handling code. The main difference
    is that instead of looking up the inodes using a struct gfs2_inum_host
    we now use just the no_addr member of this structure. The tests relating
    to no_formal_ino can then be done by the calling code. This has
    advantages in that we want to do different things in different code
    paths if the no_formal_ino doesn't match. In the NFS patch we want to
    return -ESTALE, but in the ->lookup() path, its a bug in the fs if the
    no_formal_ino doesn't match and thus we can withdraw in this case.

    In order to later fix bz #201012, we need to be able to look up an inode
    without knowing no_formal_ino, as the only information that is known to
    us is the on-disk location of the inode in question.

    This patch will also help us to fix bz #236099 at a later date by
    cleaning up a lot of the code in that area.

    There are no user visible changes as a result of this patch and there
    are no changes to the on-disk format either.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

30 Nov, 2006

25 commits


05 Sep, 2006

1 commit


11 Jul, 2006

1 commit

  • This adds a generation number for the eventual use of NFS to the
    ondisk inode. Its backward compatible with the current code since
    it doesn't really matter what the generation number is to start with,
    and indeed since its set to zero, due to it being taken from padding
    in both the inode and rgrp header, it should be fine.

    The eventual plan is to use this rather than no_formal_ino in the
    NFS filehandles. At that point no_formal_ino will be unused.

    At the same time we also add a releasepages call back to the
    "normal" address space for gfs2 inodes. Also I've removed a
    one-linrer function thats not required any more.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

15 Jun, 2006

1 commit

  • This patch fixes the way we have been dealing with unlinked,
    but still open files. It removes all limits (other than memory
    for inodes, as per every other filesystem) on numbers of these
    which we can support on GFS2. It also means that (like other
    fs) its the responsibility of the last process to close the file
    to deallocate the storage, rather than the person who did the
    unlinking. Note that with GFS2, those two events might take place
    on different nodes.

    Also there are a number of other changes:

    o We use the Linux inode subsystem as it was intended to be
    used, wrt allocating GFS2 inodes
    o The Linux inode cache is now the point which we use for
    local enforcement of only holding one copy of the inode in
    core at once (previous to this we used the glock layer).
    o We no longer use the unlinked "special" file. We just ignore it
    completely. This makes unlinking more efficient.
    o We now use the 4th block allocation state. The previously unused
    state is used to track unlinked but still open inodes.
    o gfs2_inoded is no longer needed
    o Several fields are now no longer needed (and removed) from the in
    core struct gfs2_inode
    o Several fields are no longer needed (and removed) from the in core
    superblock

    There are a number of future possible optimisations and clean ups
    which have been made possible by this patch.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

22 May, 2006

1 commit

  • This adds support to GFS2 for selinux extended attributes. There is a
    known bug in gfs2_ea_get() which is believed to be independant of this
    patch. Further patches will follow once that bug is fixed in order to
    make GFS2 use as much of the generic eattr infrastructure as possible.

    Signed-off-by: Ryan O'Hara
    Signed-off-by: Steven Whitehouse

    Ryan O'Hara
     

28 Apr, 2006

1 commit

  • This patch contains the following possible cleanups:
    - make needlessly global code static
    - #if 0 unused functions
    - remove the following global function that was both unused and
    unimplemented:
    - super.c: gfs2_do_upgrade()

    Signed-off-by: Adrian Bunk
    Signed-off-by: Steven Whitehouse

    Adrian Bunk
     

01 Apr, 2006

1 commit

  • This is designed as a fs independent way to set flags on a
    particular inode. The values of the ioctl() and flags are
    designed to be identical to the ext2/3 values. Assuming that
    this plan is acceptable to people in general, the plan is to
    then move other fs across to using the same set of #defines,
    etc.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

21 Mar, 2006

1 commit

  • Due to a typo, the dir leaf split operation was (for the first
    split in a directory) writing the new hash vaules at the
    wrong offset. This is now fixed.

    Also some other tidy ups are included:

    - We use GFS2's hash function for dentries (see ops_dentry.c) so that
    we don't have to keep recalculating the hash values.
    - A lot of common code is eliminated between the various directory
    lookup routines.
    - Better error checking on directory lookup (previously different
    routines checked for different errors)
    - The leaf split operation has a couple of redundant operations
    removed from it, so it should be faster.

    There is still further scope for further clean ups in the directory
    code, and readdir in particular could do with slimming down a bit.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

28 Feb, 2006

1 commit

  • As suggested by Pekka Enberg .

    The DIV_RU macro is renamed DIV_ROUND_UP and and moved to kernel.h
    The other macros are gone from gfs2.h as (although not requested
    by Pekka Enberg) are a number of included header file which are now
    included individually. The inode number comparison function is
    now an inline function.

    The DT2IF and IF2DT may be addressed in a future patch.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse