12 Oct, 2010

1 commit

  • fs/ocfs2/slot_map.c: In function ‘ocfs2_init_slot_info’:
    fs/ocfs2/slot_map.c:360: warning: ‘bytes’ may be used uninitialized in this function
    fs/ocfs2/slot_map.c:360: note: ‘bytes’ was declared here
    Compiler: gcc version 4.4.3 (GCC) on Mandriva
    I'm not sure why this warning occurs, I think compiler don't know that variable
    "bytes" is initialized when it is sent by reference to
    ocfs2_slot_map_physical_size and it throws that ugly warning.
    However, a simple initialization of "bytes" variable with 0 will fix it.

    Signed-off-by: Ionut Gabriel Popescu
    Signed-off-by: Joel Becker

    Poyo VL
     

05 Sep, 2009

1 commit


06 Jan, 2009

1 commit

  • Add an optional validation hook to ocfs2_read_blocks(). Now the
    validation function is only called when a block was actually read off of
    disk. It is not called when the buffer was in cache.

    We add a buffer state bit BH_NeedsValidate to flag these buffers. It
    must always be one higher than the last JBD2 buffer state bit.

    The dinode, dirblock, extent_block, and xattr_block validators are
    lifted to this scheme directly. The group_descriptor validator needs to
    be split into two pieces. The first part only needs the gd buffer and
    is passed to ocfs2_read_block(). The second part requires the dinode as
    well, and is called every time. It's only 3 compares, so it's tiny.
    This also allows us to clean up the non-fatal gd check used by resize.c.
    It now has no magic argument.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     

15 Oct, 2008

3 commits

  • ocfs2_read_blocks() currently requires the CACHED flag for cached I/O.
    However, that's the common case. Let's flip it around and provide an
    IGNORE_CACHE flag for the special users. This has the added benefit of
    cleaning up the code some (ignore_cache takes on its special meaning
    earlier in the loop).

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • More than 30 callers of ocfs2_read_block() pass exactly OCFS2_BH_CACHED.
    Only six pass a different flag set. Rather than have every caller care,
    let's make ocfs2_read_block() take no flags and always do a cached read.
    The remaining six places can call ocfs2_read_blocks() directly.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • Now that synchronous readers are using ocfs2_read_blocks_sync(), all
    callers of ocfs2_read_blocks() are passing an inode. Use it
    unconditionally. Since it's there, we don't need to pass the
    ocfs2_super either.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     

18 Apr, 2008

7 commits

  • ocfs2 asks the cluster stack for the local node's node number for two
    reasons; to fill the slot map and to print it. While the slot map isn't
    necessary for userspace cluster stacks, the printing is very nice for
    debugging. Thus we add ocfs2_cluster_this_node() as a generic API to get
    this value. It is anticipated that the slot map will not be used under a
    userspace cluster stack, so validity checks of the node num only need to
    exist in the slot map code. Otherwise, it just gets used and printed as an
    opaque value.

    [ Fixed up some "int" versus "unsigned int" issues and made osb->node_num
    truly opaque. --Mark ]

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • The old slot map had a few limitations:

    - It was limited to one block, so the maximum slot count was 255.
    - Each slot was signed 16bits, limiting node numbers to INT16_MAX.
    - An empty slot was marked by the magic 0xFFFF (-1).

    The new slot map format provides 32bit node numbers (UINT32_MAX), a
    separate space to mark a slot in use, and extra room to grow. The slot
    map is now bounded by i_size, not a block.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • The slot map file is merely an array of __le16. Wrap it in a structure for
    cleaner reference.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • The in-memory slot map uses the same magic as the on-disk one. There is
    a special value to mark a slot as invalid. It relies on the size of
    certain types and so on.

    Write a new in-memory map that keeps validity as a separate field. Outside
    of the I/O functions, OCFS2_INVALID_SLOT now means what it is supposed to.
    It also is no longer tied to the type size.

    This also means that only the I/O functions refer to 16bit quantities.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • The slot map code assumed a slot_map file has one block allocated.
    This changes the code to I/O as many blocks as will cover max_slots.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • Just use osb_lock around the ocfs2_slot_info data. This allows us to
    take the ocfs2_slot_info structure private in slot_info.c. All access
    is now via accessors.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • journal.c and dlmglue.c would refresh the slot map by hand. Instead, have
    the update and clear functions do the work inside slot_map.c. The eventual
    result is to make ocfs2_slot_info defined privately in slot_map.c

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Mark Fasheh
     

26 Jan, 2008

1 commit

  • The node maps that are set/unset by these votes are no longer relevant, thus
    we can remove the mount and umount votes. Since those are the last two
    remaining votes, we can also remove the entire vote infrastructure.

    The vote thread has been renamed to the downconvert thread, and the small
    amount of functionality related to managing it has been moved into
    fs/ocfs2/dlmglue.c. All references to votes have been removed or updated.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     

11 Jul, 2007

1 commit


09 May, 2007

1 commit


27 Apr, 2007

2 commits

  • Return an optional extent flags field from our lookup functions and wire up
    callers to treat unwritten regions as holes for the purpose of returning
    zeros to the user.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     
  • The code in extent_map.c is not prepared to deal with a subtree being
    rotated between lookups. This can happen when filling holes in sparse files.
    Instead of a lengthy patch to update the code (which would likely lose the
    benefit of caching subtree roots), we remove most of the algorithms and
    implement a simple path based lookup. A less ambitious extent caching scheme
    will be added in a later patch.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     

14 Dec, 2006

1 commit

  • All kcalloc() calls of the form "kcalloc(1,...)" are converted to the
    equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect
    ordering of the first two arguments are fixed.

    Signed-off-by: Robert P. J. Day
    Cc: Jeff Garzik
    Cc: Alan Cox
    Cc: Dominik Brodowski
    Cc: Adam Belay
    Cc: James Bottomley
    Cc: Greg KH
    Cc: Mark Fasheh
    Cc: Trond Myklebust
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

30 Jun, 2006

1 commit


04 Jan, 2006

1 commit