28 Sep, 2010
1 commit
-
Some of the functions in GFS2 were not reserving space in the transaction for
the resource group header and the resource groups bitblocks that get added
when you do allocation. GFS2 now makes sure to reserve space for the
resource group header and either all the bitblocks in the resource group, or
one for each block that it may allocate, whichever is smaller using the new
gfs2_rg_blocks() inline function.Signed-off-by: Benjamin Marzinski
Signed-off-by: Steven Whitehouse
20 Sep, 2010
1 commit
-
With the update of the truncate code, ip->i_disksize and
inode->i_size are merely copies of each other. This means
we can remove ip->i_disksize and use inode->i_size exclusively
reducing the size of a GFS2 inode by 8 bytes.Signed-off-by: Steven Whitehouse
08 Aug, 2010
1 commit
-
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
ext3: Fix dirtying of journalled buffers in data=journal mode
ext3: default to ordered mode
quota: Use mark_inode_dirty_sync instead of mark_inode_dirty
quota: Change quota error message to print out disk and function name
MAINTAINERS: Update entries of ext2 and ext3
MAINTAINERS: Update address of Andreas Dilger
ext3: Avoid filesystem corruption after a crash under heavy delete load
ext3: remove vestiges of nobh support
ext3: Fix set but unused variables
quota: clean up quota active checks
quota: Clean up the namespace in dqblk_xfs.h
quota: check quota reservation on remove_dquot_ref
29 Jul, 2010
1 commit
-
Function gfs2_write_alloc_required always returned zero as its
return code. Therefore, it doesn't need to return a return code
at all. Given that, we can use the return value to return whether
or not the dinode needs block allocations rather than passing
that value in, which in turn simplifies a bunch of error checking.Signed-off-by: Bob Peterson
Signed-off-by: Steven Whitehouse
21 Jul, 2010
1 commit
-
Almost all identifiers use the FS_* namespace, so rename the missing few
XFS_* ones to FS_* as well. Without this some people might get upset
about having too many XFS names in generic code.Acked-by: Steven Whitehouse
Signed-off-by: Christoph Hellwig
Signed-off-by: Jan Kara
19 Jul, 2010
1 commit
-
The current shrinker implementation requires the registered callback
to have global state to work from. This makes it difficult to shrink
caches that are not global (e.g. per-filesystem caches). Pass the shrinker
structure to the callback so that users can embed the shrinker structure
in the context the shrinker needs to operate on and get back to it in the
callback via container_of().Signed-off-by: Dave Chinner
Reviewed-by: Christoph Hellwig
15 Jul, 2010
1 commit
-
HighMem pages on i686 do not get mapped to the buffer_heads and this was
causing a NULL pointer dereference when we were trying to memset page buffers
to zero.
We now use zero_user() that kmaps the page and directly manipulates page data.
This patch also fixes a boundary condition that was incorrect.Signed-off-by: Abhi Das
Signed-off-by: Steven Whitehouse
22 May, 2010
2 commits
-
Pass the larger struct fs_disk_quota to the ->set_dqblk operation so
that the Q_SETQUOTA and Q_XSETQUOTA operations can be implemented
with a single filesystem operation and we can retire the ->set_xquota
operation. The additional information (RT-subvolume accounting and
warn counts) are left zero for the VFS quota implementation.Add new fieldmask values for setting the numer of blocks and inodes
values which is required for the VFS quota, but wasn't for XFS.Signed-off-by: Christoph Hellwig
Signed-off-by: Jan Kara -
Pass the larger struct fs_disk_quota to the ->get_dqblk operation so
that the Q_GETQUOTA and Q_XGETQUOTA operations can be implemented
with a single filesystem operation and we can retire the ->get_xquota
operation. The additional information (RT-subvolume accounting and
warn counts) are left zero for the VFS quota implementation.Signed-off-by: Christoph Hellwig
Signed-off-by: Jan Kara
10 May, 2010
1 commit
-
This is the upstream fix for this bug. This patch differs
from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte
value field of the quota. In upstream quota code, we're
required to write the entire quota (88 bytes) which can be split
across a page boundary. We check for such quotas, and read/write
the two parts from/to the corresponding pages holding these parts.With this patch, I don't see the bug anymore using the reproducer
in Red Hat bz 555754. I successfully ran a couple of simple tests/mounts/
umounts and it doesn't seem like this patch breaks anything else.Signed-off-by: Abhi Das
Signed-off-by: Steven Whitehouse
05 May, 2010
1 commit
-
We need to report both the accounting and enforcing flags if we are
in enforcing mode.Signed-off-by: Christoph Hellwig
Signed-off-by: Steven Whitehouse
05 Mar, 2010
1 commit
-
Currenly sync_quota_sb does a lot of sync and truncate action that only
applies to "VFS" style quotas and is actively harmful for the sync
performance in XFS. Move it into vfs_quota_sync and add a wait parameter
to ->quota_sync to tell if we need it or not.My audit of the GFS2 code says it's also not needed given the way GFS2
implements quotas, but I'd be happy if this can get a detailed review.Signed-off-by: Christoph Hellwig
Signed-off-by: Jan Kara
03 Dec, 2009
11 commits
-
GFS2 now has three new mount options, statfs_quantum, quota_quantum and
statfs_percent. statfs_quantum and quota_quantum simply allow you to
set the tunables of the same name. Setting setting statfs_quantum to 0
will also turn on the statfs_slow tunable. statfs_percent accepts an
integer between 0 and 100. Numbers between 1 and 100 will cause GFS2 to
do any early sync when the local number of blocks free changes by at
least statfs_percent from the totoal number of blocks free. Setting
statfs_percent to 0 disables this.Signed-off-by: Benjamin Marzinski
Signed-off-by: Steven Whitehouse -
This adds support to GFS2 to send quota warnings via netlink.
Also it removes a stray \r which was left over from when the
code used to print warnings on the console.Signed-off-by: Steven Whitehouse
-
This patch adds the ability to set GFS2 quota limit and
warning levels via the XFS quota API.Signed-off-by: Steven Whitehouse
-
This adds support for viewing the current GFS2 quota settings
via the XFS quota API. The setting of quotas will be addressed
in a later patch. Fields which are not supported here are left
set to zero.Signed-off-by: Steven Whitehouse
Reviewed-by: Bob Peterson -
Both of these functions contained confusing and in one case
duplicate code. This patch adds a new check in do_glock()
so that we report -ENOENT if we are asked to sync a quota
entry which doesn't exist. Due to the previous patch this is
now reported correctly to userspace.Also there are a few new comments, and I hope that the code
is easier to understand now.Signed-off-by: Steven Whitehouse
-
This function was only ever called with the "create"
argument set to true, so we can remove it.Signed-off-by: Steven Whitehouse
-
The "create" argument to qdsb_get() was only ever set to true,
so this patch removes that argument.Signed-off-by: Steven Whitehouse
-
This allows querying of the quota state via the XFS quota
API.Signed-off-by: Steven Whitehouse
-
There is no point in testing for GLF_DEMOTE here, we might as
well always release the glock at that point.Signed-off-by: Steven Whitehouse
-
The plan is to add further operations to the gfs2_quotactl_ops
in future patches. The sync operation is easy, so we start with
that one.We plan to use the XFS quota control functions because they more
closely match the GFS2 ones.Signed-off-by: Steven Whitehouse
-
These two functions are altered so that gfs2_quota_sync may
in future be called directly from the VFS. The GFS2 superblock
changes to a VFS super block and there is an addition of an int
argument which is currently ignored.Signed-off-by: Steven Whitehouse
22 May, 2009
1 commit
-
This patch renames the ops_*.c files which have no counterpart
without the ops_ prefix in order to shorten the name and make
it more readable. In addition, ops_address.h (which was very
small) is moved into inode.h and inode.h is cleaned up by
adding extern where required.Signed-off-by: Steven Whitehouse
15 Apr, 2009
2 commits
-
SPIN_LOCK_UNLOCKED is deprecated, use DEFINE_SPINLOCK instead.
(as suggested in Documentation/spinlocks.txt)Signed-off-by: Xu Gang
Signed-off-by: Steven Whitehouse -
So we don't count its D state in the loadavg.
Reported-by: Nathan Straz
Signed-off-by: Steven Whitehouse
24 Mar, 2009
3 commits
-
This is the big patch that I've been working on for some time
now. There are many reasons for wanting to make this change
such as:
o Reducing overhead by eliminating duplicated fields between structures
o Simplifcation of the code (reduces the code size by a fair bit)
o The locking interface is now the DLM interface itself as proposed
some time ago.
o Fewer lookups of glocks when processing replies from the DLM
o Fewer memory allocations/deallocations for each glock
o Scope to do further optimisations in the future (but this patch is
more than big enough for now!)Please note that (a) this patch relates to the lock_dlm module and
not the DLM itself, that is still a separate module; and (b) that
we retain the ability to build GFS2 as a standalone single node
filesystem with out requiring the DLM.This patch needs a lot of testing, hence my keeping it I restarted
my -git tree after the last merge window. That way, this has the maximum
exposure before its merged. This is (modulo a few minor bug fixes) the
same patch that I've been posting on and off the the last three months
and its passed a number of different tests so far.Signed-off-by: Steven Whitehouse
-
We only really need a single spin lock for the quota data, so
lets just use the lru lock for now.Signed-off-by: Steven Whitehouse
Cc: Abhijith Das -
Deallocation of gfs2_quota_data objects now happens on-demand through a
shrinker instead of routinely deallocating through the quotad daemon.Signed-off-by: Abhijith Das
Signed-off-by: Steven Whitehouse
05 Jan, 2009
4 commits
-
Following on from the recent clean up of gfs2_quotad, this patch moves
the processing of "truncate in progress" inodes from the glock workqueue
into gfs2_quotad. This fixes a hang due to the "truncate in progress"
processing requiring glocks in order to complete.It might seem odd to use gfs2_quotad for this particular item, but
we have to use a pre-existing thread since creating a thread implies
a GFP_KERNEL memory allocation which is not allowed from the glock
workqueue context. Of the existing threads, gfs2_logd and gfs2_recoverd
may deadlock if used for this operation. gfs2_scand and gfs2_glockd are
both scheduled for removal at some (hopefully not too distant) future
point. That leaves only gfs2_quotad whose workload is generally fairly
light and is easily adapted for this extra task.Also, as a result of this change, it opens the way for a future patch to
make the reading of the inode's information asynchronous with respect to
the glock workqueue, which is another improvement that has been on the list
for some time now.Signed-off-by: Steven Whitehouse
-
This patch is a clean up of gfs2_quotad prior to giving it an
extra job to do in addition to the current portfolio of updating
the quota and statfs information from time to time.As a result it has been moved into quota.c allowing one of the
functions it calls to be made static. Also the clean up allows
the two existing functions to have separate timeouts and also
to coexist with its future role of dealing with the "truncate in
progress" inode flag.The (pointless) setting of gfs2_quotad_secs is removed since we
arrange to only wake up quotad when one of the two timers expires.In addition the struct gfs2_quota_data is moved into a slab cache,
mainly for easier debugging. It should also be possible to use
a shrinker in the future, rather than the current scheme of scanning
the quota data entries from time to time.Signed-off-by: Steven Whitehouse
-
The final field in gfs2_dinode_host was the i_flags field. Thats
renamed to i_diskflags in order to avoid confusion with the existing
inode flags, and moved into the inode proper at a suitable location
to avoid creating a "hole".At that point struct gfs2_dinode_host is no longer needed and as
promised (quite some time ago!) it can now be removed completely.Signed-off-by: Steven Whitehouse
-
This patch moved the i_size field from the gfs2_dinode_host and
following the ext3 convention renames it i_disksize.Signed-off-by: Steven Whitehouse
11 Jul, 2008
1 commit
-
Fix GFS2's need_sync()'s use of do_div() on an s64 by using div_s64() instead.
This does assume that gt_quota_scale_den can be cast to an s32.
This was introduced by patch b3b94faa5fe5968827ba0640ee9fba4b3e7f736e.
Signed-off-by: David Howells
Signed-off-by: Steven Whitehouse
10 Apr, 2008
1 commit
-
There are several places where GFP_KERNEL allocations happen under a glock,
which will result in hangs if we're under memory pressure and go to re-enter the
fs in order to flush stuff out. This patch changes the culprits to GFS_NOFS to
keep this problem from happening. Thank you,Signed-off-by: Josef Bacik
Signed-off-by: Steven Whitehouse
31 Mar, 2008
2 commits
-
This patch combines the 2 patches in bug 434736 to correct the lock
ordering in the unstuffing of the quota inode in gfs2_adjust_quota and
adjusting the number of revokes in gfs2_write_jdata_pagevecSigned-off-by: Abhijith Das
Signed-off-by: Steven Whitehouse -
gfs2_alloc_get may fail so we have to check it to prevent
NULL pointer dereference.Signed-off-by: Cyrill Gorcunov
Signed-off-by: Steven Whitehouse
25 Jan, 2008
3 commits
-
It is possible to reduce the size of GFS2 inodes by taking the i_alloc
structure out of the gfs2_inode. This patch allocates the i_alloc
structure whenever its needed, and frees it afterward. This decreases
the amount of low memory we use at the expense of requiring a memory
allocation for each page or partial page that we write. A quick test
with postmark shows that the overhead is not measurable and I also note
that OCFS2 use the same approach.In the future I'd like to solve the problem by shrinking down the size
of the members of the i_alloc structure, but for now, this reduces the
immediate problem of using too much low-memory on x86 and doesn't add
too much overhead.Signed-off-by: Steven Whitehouse
-
This just eliminates an unused variable from the quota code.
Not likely to be a time saver.Signed-off-by: Bob Peterson
Signed-off-by: Steven Whitehouse -
This patch is just a cleanup. Function gfs2_get_block() just calls
function gfs2_block_map reversing the last two parameters. By
reversing the parameters, gfs2_block_map() may be called directly
and function gfs2_get_block may be eliminated altogether.
Since this function is done for every block operation,
this streamlines the code and makes it a little bit more efficient.Signed-off-by: Bob Peterson
Signed-off-by: Steven Whitehouse