[Ocfs2-commits] branch, master, updated. 43cfb58474a2a0ff388151aa6bb4885018447b1f
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Apr 1 13:53:29 PDT 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The ocfs2 filesystem version 1.6".
The branch, master has been updated
via 43cfb58474a2a0ff388151aa6bb4885018447b1f (commit)
via c2da849f68daf71fc1cdf67523f8662cb4c60290 (commit)
via bf49ed318285cf658c378aa31dccf255d97015dc (commit)
via daec4205f9ce043542487b5b5c07fab64f9eb3ee (commit)
via 6e58676531440eef6f49a0f3f61e194baf0356ef (commit)
via 9e3e1d74e249ca4ecf318c80f2af188813a1b416 (commit)
via d3738a18a2c1bd62e8a8185ad3918f33d6fe5c38 (commit)
via e0f4ef25389993a81c3757b6744a35de474249b6 (commit)
via 255d31186782403a3188f85cdecb778d71775ee1 (commit)
via fd81f2acc784fcc26489c9752bb6b7b992fa9135 (commit)
via 83546c26d07dd8e41423a25772c5eaa75f572328 (commit)
via 303cdb038461df91110c0acec7943d4137d69085 (commit)
via 4ba1faae8b00027076d677d2452247e643006353 (commit)
via cade064ade8af598a6a843bd96ebd81c9efffe86 (commit)
via b54bca5ff7c4a4b68192d9ea9a9a5efdbad9619b (commit)
via 664259664bd67fc2ccc04115c8041ac960efd7f4 (commit)
via b14c3312b04969a2d1fd18ccc25307a91a4e3874 (commit)
via 0aeaf2be09d44dec48d38ff4f0024f4c1a2e5a04 (commit)
via bcfed638400dd32a2674258ae4b6082af9bc0f1c (commit)
via ebaf0629eb989c8c2df305c789695ba9bbaa66b5 (commit)
via f84ea20e669b24bbef2d80d183aeeadce3764ae6 (commit)
via 51b4e98926e9d68ba0568db0be29cad9d74683d3 (commit)
via 8dc9963f022f674fcb01193714a3d11f42677744 (commit)
via 94f5c3c02575d7ddac4878b9ae6134012d0f3df2 (commit)
via 7fdb8c67c73fc61ead2f6376855a36e39d4c545c (commit)
via e92a15ee2f22c76daa585e3c9cc3aadc53ae9497 (commit)
via 382cd04889e1f05c428bc5f77aeb00e64e9c4db3 (commit)
via d7bd73a9e5b944d9bc2a78daae6e98c1cc0f0374 (commit)
via 38e2643ba15888eec54d77163274c0ce6fd623af (commit)
via ea9449efec929d6f973e589a747119eb77e6cb5b (commit)
via e9b67f6aa04ee3db57ffa9e1e88cd78ad2bf6f2d (commit)
via c05d97b71f88d42f6bdcade4c8fba0db9200eacc (commit)
via 5a90432106ac6f30210145af5a0c643eaacc190c (commit)
via b6b9d9d2063c136333d1a0b46e05891a1ca8c826 (commit)
via 710f16e0aa2d5baa443e3aa7058be205ba24e682 (commit)
via 63f67d58f2eb52185971e9223740222cafa84d73 (commit)
via 32c7c7249e2189fc1fc9313025407b7fbbacc987 (commit)
via e5653b4c14175661cc3bde44b7fa118815d13344 (commit)
via 5c03632d663baa90bc3591a2775cb7856a21ed1b (commit)
via ccedff19b9a494ef840d06b1bb99e94dc66a6a30 (commit)
via 73b73c8b512040a7fab7b77b7707e4f3351fb37b (commit)
via bbeaa0938ffff3e2f43f5dc053c1f362ffa8c8fe (commit)
via 830b17e968a4ff0c56b142095f4abdd21a5f6603 (commit)
via 0b4a7558716020baf7996f59c283d730da23edf6 (commit)
via fa824a0b1c20f502392817b05b2c8b8c3f46eafa (commit)
via 16019a9b654d9408f9f74c460a1f7a8a6e550c40 (commit)
via 2b01cb586d86766df5fc9171501f29da5b87f115 (commit)
via 75cb2127c4bdca35018188f62a3f6bd8afbfb3ac (commit)
via 1dcd92c47c574ab3c1cb3d389982bf4e8e9464a0 (commit)
via 4cc5ca07b3244c5ae73f5f2b268b7c38deca2e88 (commit)
via 92219eb220a8c4ea91bbb1ace60b12cb514dab3b (commit)
via 712dd05f201a90a849589f45db4e4327bd1b0197 (commit)
via 25149a68016e61a80340cd1b1249649b03dc1b11 (commit)
via aceb74f44c51a56aacb1265e90d667d36bab54ab (commit)
via 1a795ed033a85c682ddaf9f614c93bdfb174d1a3 (commit)
via daf08624ec3956360edb1b590f1de8d775ccb8e2 (commit)
via fc5cb771d8526642f55083d6ab184729dac96814 (commit)
via 785843ad090ba8ef424818af4256ed2de2068139 (commit)
via 14da8da6a80b0418ee43c733b3ad479b2105b14a (commit)
via a9b556ff31d2b36c3d776829ee019a431980daae (commit)
via a887882401e9efc742dfd49e59bd76c713f33fde (commit)
from 7ea630a42b3937347e997dbf827f6a3f1190f8a9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 43cfb58474a2a0ff388151aa6bb4885018447b1f
Author: Srinivas Eeda <srinivas.eeda at oracle.com>
Date: Thu Apr 1 10:26:00 2010 -0700
ocfs2: Fix a race in o2dlm lockres mastery
Mainline commit 14741472a05245ed5778aa0aec055e1f920b6ef8
In o2dlm, the master of a lock resource keeps a map of all interested
nodes. This prevents the master from purging the resource before an
interested node can create a lock.
A race between the mastery thread and the mastery handler allowed an
interested node to discover who the master is without informing the
master directly. This is easily fixed by holding the dlm spinlock a
little longer in the mastery handler.
Signed-off-by: Srinivas Eeda <srinivas.eeda at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit c2da849f68daf71fc1cdf67523f8662cb4c60290
Author: Tristan Ye <tristan.ye at oracle.com>
Date: Thu Apr 1 10:25:43 2010 -0700
Ocfs2: Handle deletion of reflinked oprhan inodes correctly.
Mainline commit b54c2ca475fa7d7450a45b6d778dae9dbe0bcbfe
The rule is that all inodes in the orphan dir have ORPHANED_FL,
otherwise we treated it as an ERROR. This rule works well except
for some rare cases of reflink operation:
http://oss.oracle.com/bugzilla/show_bug.cgi?id=1215
The problem is caused by how reflink and our orphan_scan thread
interact.
* The orphan scan pulls the orphans into a queue first, then runs the
queue at a later time. We only hold the orphan_dir's lock
during scanning.
* Reflink create a oprhaned target in orphan_dir as its first step.
It removes the target and clears the flag as the final step.
These two steps take the orphan_dir's lock, but it is not held for
the duration.
Based on the above semantics, a reflink inode can be moved out of the
orphan dir and have its ORPHANED_FL cleared before the queue of orphans
is run. This leads to a ERROR in ocfs2_query_wipde_inode().
This patch teaches ocfs2_query_wipe_inode() to detect previously
orphaned reflink targets. If a reflink fails or a crash occurs during
the relfink operation, the inode will retain ORPHANED_FL and will be
properly wiped.
Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit bf49ed318285cf658c378aa31dccf255d97015dc
Author: Tristan Ye <tristan.ye at oracle.com>
Date: Thu Apr 1 10:25:32 2010 -0700
Ocfs2: Journaling i_flags and i_orphaned_slot when adding inode to orphan dir.
Mainline commit 3939fda4b389993caf8741df5739b3e49f33a263
Currently, some callers were missing to journal the dirty inode after
adding it to orphan dir.
Now we're going to journal such modifications within the ocfs2_orphan_add()
itself, It's safe to do so, though some existing caller may duplicate this,
and it makes the logic look more straightforward anyway.
Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit daec4205f9ce043542487b5b5c07fab64f9eb3ee
Author: Mark Fasheh <mfasheh at suse.com>
Date: Thu Apr 1 10:25:14 2010 -0700
ocfs2: Clear undo bits when local alloc is freed
Mainline commit b4414eea0e7b9c134262c801a87e338bf675962c
When the local alloc file changes windows, unused bits are freed back to the
global bitmap. By defnition, those bits can not be in use by any file. Also,
the local alloc will never have been able to allocate those bits if they
were part of a previous truncate. Therefore it makes sense that we should
clear unused local alloc bits in the undo buffer so that they can be used
immediatly.
[ Modified to call it ocfs2_release_clusters() -- Joel ]
Signed-off-by: Mark Fasheh <mfasheh at suse.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 6e58676531440eef6f49a0f3f61e194baf0356ef
Author: Tao Ma <tao.ma at oracle.com>
Date: Thu Apr 1 10:25:06 2010 -0700
ocfs2: Init meta_ac properly in ocfs2_create_empty_xattr_block.
Mainline commit b23179681c90a55e2a2083e1dde9f727ecffb2b7
You can't store a pointer that you haven't filled in yet and expect it
to work.
Signed-off-by: Tao Ma <tao.ma at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 9e3e1d74e249ca4ecf318c80f2af188813a1b416
Author: Tao Ma <tao.ma at oracle.com>
Date: Thu Apr 1 10:24:53 2010 -0700
ocfs2: Fix the update of name_offset when removing xattrs
Mainline commit dfe4d3d6a6f707fff1dbfd4b8fce65e64a91b809
When replacing a xattr's value, in some case we wipe its name/value
first and then re-add it. The wipe is done by
ocfs2_xa_block_wipe_namevalue() when the xattr is in the inode or
block. We currently adjust name_offset for all the entries which have
(offset < name_offset). This does not adjust the entrie we're replacing.
Since we are replacing the entry, we don't adjust the total entry count.
When we calculate a new namevalue location, we trust the entries
now-wrong offset in ocfs2_xa_get_free_start(). The solution is to
also adjust the name_offset for the replaced entry, allowing
ocfs2_xa_get_free_start() to calculate the new namevalue location
correctly.
The following script can trigger a kernel panic easily.
echo 'y'|mkfs.ocfs2 --fs-features=local,xattr -b 4K $DEVICE
mount -t ocfs2 $DEVICE $MNT_DIR
FILE=$MNT_DIR/$RANDOM
for((i=0;i<76;i++))
do
string_76="a$string_76"
done
string_78="aa$string_76"
string_82="aaaa$string_78"
touch $FILE
setfattr -n 'user.test1234567890' -v $string_76 $FILE
setfattr -n 'user.test1234567890' -v $string_78 $FILE
setfattr -n 'user.test1234567890' -v $string_82 $FILE
Signed-off-by: Tao Ma <tao.ma at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit d3738a18a2c1bd62e8a8185ad3918f33d6fe5c38
Author: Mark Fasheh <mfasheh at suse.com>
Date: Thu Apr 1 10:24:42 2010 -0700
ocfs2: Always try for maximum bits with new local alloc windows
Mainline commit b22b63ebafb97b66d1054e69941ee049d790c6cf
What we were doing before was to ask for the current window size as the
maximum allocation. This had the effect of limiting the amount of allocation
we could get for the local alloc during times when the window size was
shrunk due to fragmentation. In some cases, that could actually *increase*
fragmentation by artificially limiting the number of bits we can accept. So
while we still want to ask for a minimum number of bits equal to window
size, there is no reason why we should limit the number of bits the local
alloc should accept. Hence always allow the maximum number of local alloc
bits.
Signed-off-by: Mark Fasheh <mfasheh at suse.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit e0f4ef25389993a81c3757b6744a35de474249b6
Author: Mark Fasheh <mfasheh at suse.com>
Date: Thu Apr 1 10:24:33 2010 -0700
ocfs2: set i_mode on disk during acl operations
Mainline commit fcefd25ac89239cb57fa198f125a79ff85468c75
ocfs2_set_acl() and ocfs2_init_acl() were setting i_mode on the in-memory
inode, but never setting it on the disk copy. Thus, acls were some times not
getting propagated between nodes. This patch fixes the issue by adding a
helper function ocfs2_acl_set_mode() which does this the right way.
ocfs2_set_acl() and ocfs2_init_acl() are then updated to call
ocfs2_acl_set_mode().
Signed-off-by: Mark Fasheh <mfasheh at suse.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 255d31186782403a3188f85cdecb778d71775ee1
Author: Tao Ma <tao.ma at oracle.com>
Date: Thu Apr 1 10:24:24 2010 -0700
ocfs2: Update i_blocks in reflink operations.
Mainline commit 6527f8f848ec84b9daf1cb07601266126b8507ab
In reflink, we need to upate i_blocks for the target inode.
Reported-by: Jie Liu <jeff.liu at oracle.com>
Signed-off-by: Tao Ma <tao.ma at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit fd81f2acc784fcc26489c9752bb6b7b992fa9135
Author: Tao Ma <tao.ma at oracle.com>
Date: Thu Apr 1 10:24:14 2010 -0700
ocfs2: Change bg_chain check for ocfs2_validate_gd_parent.
Mainline commit 78c37eb0d5e6a9727b12ea0f1821795ffaa66cfe
In ocfs2_validate_gd_parent, we check bg_chain against the
cl_next_free_rec of the dinode. Actually in resize, we have
the chance of bg_chain == cl_next_free_rec. So add some
additional condition check for it.
I also rename paramter "clean_error" to "resize", since the
old one is not clearly enough to indicate that we should only
meet with this case in resize.
btw, the correpsonding bug is
http://oss.oracle.com/bugzilla/show_bug.cgi?id=1230.
Signed-off-by: Tao Ma <tao.ma at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 83546c26d07dd8e41423a25772c5eaa75f572328
Author: Sachin Prabhu <sprabhu at redhat.com>
Date: Thu Apr 1 10:23:48 2010 -0700
ocfs2: Skip check for mandatory locks when unlocking
Mainline commit ee860b6a650360c91f5d5f9a94262aad9be90015
ocfs2_lock() will skip locks on file which has mode set to 02666. This
is a problem in cases where the mode of the file is changed after a
process has obtained a lock on the file.
ocfs2_lock() should skip the check for mandatory locks when unlocking a
file.
Signed-off-by: Sachin Prabhu <sprabhu at redhat.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 303cdb038461df91110c0acec7943d4137d69085
Author: Joe Perches <joe at perches.com>
Date: Thu Apr 1 10:23:27 2010 -0700
fs/ocfs2/cluster/tcp.c: remove use of NIPQUAD, use %pI4
Mainline commit 03affdef4fc85e416e3862abb0aa549c6034cdd0
Signed-off-by: Joe Perches <joe at perches.com>
Cc: Mark Fasheh <mfasheh at suse.com>
Acked-by: Joel Becker <joel.becker at oracle.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
commit 4ba1faae8b00027076d677d2452247e643006353
Author: Sunil Mushran <sunil.mushran at oracle.com>
Date: Thu Apr 1 11:52:46 2010 -0700
ocfs2: Handle missing const modifier in struct sysfs_ops in struct kobj_type
Mainline commit 52cf25d0ab7f78eeecc59ac652ed5090f69b619e constified
struct sysfs_ops in struct kobj_type.
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
commit cade064ade8af598a6a843bd96ebd81c9efffe86
Author: Emese Revfy <re.emese at gmail.com>
Date: Thu Apr 1 10:23:16 2010 -0700
Driver core: Constify struct sysfs_ops in struct kobj_type
Mainline commit 52cf25d0ab7f78eeecc59ac652ed5090f69b619e
Constify struct sysfs_ops.
This is part of the ops structure constification
effort started by Arjan van de Ven et al.
Benefits of this constification:
* prevents modification of data that is shared
(referenced) by many other structure instances
at runtime
* detects/prevents accidental (but not intentional)
modification attempts on archs that enforce
read-only kernel data at runtime
* potentially better optimized code as the compiler
can assume that the const data cannot be changed
* the compiler/linker move const data into .rodata
and therefore exclude them from false sharing
Signed-off-by: Emese Revfy <re.emese at gmail.com>
Acked-by: David Teigland <teigland at redhat.com>
Acked-by: Matt Domsch <Matt_Domsch at dell.com>
Acked-by: Maciej Sosnowski <maciej.sosnowski at intel.com>
Acked-by: Hans J. Koch <hjk at linutronix.de>
Acked-by: Pekka Enberg <penberg at cs.helsinki.fi>
Acked-by: Jens Axboe <jens.axboe at oracle.com>
Acked-by: Stephen Hemminger <shemminger at vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
commit b54bca5ff7c4a4b68192d9ea9a9a5efdbad9619b
Author: Akinobu Mita <akinobu.mita at gmail.com>
Date: Thu Apr 1 10:21:40 2010 -0700
bitops: rename for_each_bit() to for_each_set_bit()
Mainline commit 984b3f5746ed2cde3d184651dabf26980f2b66e5
Rename for_each_bit to for_each_set_bit in the kernel source tree. To
permit for_each_clear_bit(), should that ever be added.
The patch includes a macro to map the old for_each_bit() onto the new
for_each_set_bit(). This is a (very) temporary thing to ease the migration.
[akpm at linux-foundation.org: add temporary for_each_bit()]
Suggested-by: Alexey Dobriyan <adobriyan at gmail.com>
Suggested-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Akinobu Mita <akinobu.mita at gmail.com>
Cc: "David S. Miller" <davem at davemloft.net>
Cc: Russell King <rmk at arm.linux.org.uk>
Cc: David Woodhouse <dwmw2 at infradead.org>
Cc: Artem Bityutskiy <dedekind at infradead.org>
Cc: Stephen Rothwell <sfr at canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
commit 664259664bd67fc2ccc04115c8041ac960efd7f4
Author: Sunil Mushran <sunil.mushran at oracle.com>
Date: Thu Apr 1 13:26:44 2010 -0700
ocfs2: Quota fixups
The last few quotas patches conflict with the quotas in EL5.
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
commit b14c3312b04969a2d1fd18ccc25307a91a4e3874
Author: Tristan Ye <tristan.ye at oracle.com>
Date: Thu Apr 1 10:21:31 2010 -0700
dquot: cleanup dquot initialize routine
Mainline commit 871a293155a24554e153538d36e3a80fa169aefb
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 <hch at lst.de>
Signed-off-by: Jan Kara <jack at suse.cz>
commit 0aeaf2be09d44dec48d38ff4f0024f4c1a2e5a04
Author: Tristan Ye <tristan.ye at oracle.com>
Date: Thu Apr 1 10:21:22 2010 -0700
dquot: move dquot initialization responsibility into the filesystem
Mainline commit 907f4554e2521cb28b0009d17167760650a9561c
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 <hch at lst.de>
Signed-off-by: Jan Kara <jack at suse.cz>
commit bcfed638400dd32a2674258ae4b6082af9bc0f1c
Author: Christoph Hellwig <hch at infradead.org>
Date: Thu Apr 1 10:21:14 2010 -0700
dquot: cleanup dquot drop routine
Mainline commit 9f7547580263d4a55efe06ce5cfd567f568be6e8
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 <hch at lst.de>
Signed-off-by: Jan Kara <jack at suse.cz>
commit ebaf0629eb989c8c2df305c789695ba9bbaa66b5
Author: Christoph Hellwig <hch at infradead.org>
Date: Thu Apr 1 10:21:05 2010 -0700
dquot: move dquot drop responsibility into the filesystem
Mainline commit 257ba15cedf1288f0c96118d7e63947231d27278
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 <hch at lst.de>
Signed-off-by: Jan Kara <jack at suse.cz>
commit f84ea20e669b24bbef2d80d183aeeadce3764ae6
Author: Christoph Hellwig <hch at infradead.org>
Date: Thu Apr 1 10:20:57 2010 -0700
dquot: cleanup dquot transfer routine
Mainline commit b43fa8284d7790d9cca32c9c55e24f29be2fa33b
Get rid of the transfer 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_transfer helper to __dquot_transfer
and vfs_dq_transfer to dquot_transfer to have a consistent namespace,
and make the new dquot_transfer return a normal negative errno value
which all callers expect.
Signed-off-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Jan Kara <jack at suse.cz>
commit 51b4e98926e9d68ba0568db0be29cad9d74683d3
Author: Christoph Hellwig <hch at infradead.org>
Date: Thu Apr 1 10:20:48 2010 -0700
dquot: cleanup inode allocation / freeing routines
Mainline commit 63936ddaa16b9486e2d426ed7b09f559a5c60f87
Get rid of the alloc_inode and free_inode dquot operations - they are
always called from the filesystem and if a filesystem really needs
their own (which none currently does) it can just call into it's
own routine directly.
Also get rid of the vfs_dq_alloc/vfs_dq_free wrappers and always
call the lowlevel dquot_alloc_inode / dqout_free_inode routines
directly, which now lose the number argument which is always 1.
Signed-off-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Jan Kara <jack at suse.cz>
commit 8dc9963f022f674fcb01193714a3d11f42677744
Author: Christoph Hellwig <hch at infradead.org>
Date: Thu Apr 1 10:20:38 2010 -0700
dquot: cleanup space allocation / freeing routines
Mainline commit 5dd4056db84387975140ff2568eaa0406f07985e
Get rid of the alloc_space, free_space, reserve_space, claim_space and
release_rsv dquot operations - they are always called from the filesystem
and if a filesystem really needs their own (which none currently does)
it can just call into it's own routine directly.
Move shared logic into the common __dquot_alloc_space,
dquot_claim_space_nodirty and __dquot_free_space low-level methods,
and rationalize the wrappers around it to move as much as possible
code into the common block for CONFIG_QUOTA vs not. Also rename
all these helpers to be named dquot_* instead of vfs_dq_*.
Signed-off-by: Christoph Hellwig <hch at lst.de>
Signed-off-by: Jan Kara <jack at suse.cz>
commit 94f5c3c02575d7ddac4878b9ae6134012d0f3df2
Author: Tristan Ye <tristan.ye at oracle.com>
Date: Thu Apr 1 10:20:29 2010 -0700
Ocfs2: Move ocfs2 ioctl definitions from ocfs2_fs.h to newly added ocfs2_ioctl.h
Mainline commit 9df5778ecee8b301b447fc05706792d5f447ace5
Currently we were adding ioctl cmds/structures for ocfs2 into ocfs2_fs.h
which was used for define ocfs2 on-disk layout. That sounds a little bit
confusing, and it may be quickly polluted espcially when growing the
ocfs2_info_request ioctls afterwards(it will grow i bet).
As a result, such OCFS2 IOCs do need to be placed somewhere other than
ocfs2_fs.h, a separated ocfs2_ioctl.h will be added to store such ioctl
structures and definitions which could also be used from userspace to
invoke ioctls call.
Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 7fdb8c67c73fc61ead2f6376855a36e39d4c545c
Author: Wengang Wang <wen.gang.wang at oracle.com>
Date: Thu Apr 1 10:20:16 2010 -0700
ocfs2: send SIGXFSZ if new filesize exceeds limit -v2
Mainline commit 5051f76883897ea3d3d034c92e7b84236da2ec57
This patch makes ocfs2 send SIGXFSZ if new file size exceeds the rlimit.
Processes may get SIGXFSZ on one node (in the cluster) while others will
not on another if file size limits are different on the two nodes.
Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit e92a15ee2f22c76daa585e3c9cc3aadc53ae9497
Author: Sunil Mushran <sunil.mushran at oracle.com>
Date: Thu Apr 1 10:20:07 2010 -0700
ocfs2/userdlm: Add tracing in userdlm
Mainline commit 6fcef3f04a1a0f8d7a086147d2f2e650c8cc2754
Make use of the newly added BASTS masklog to trace ASTs and BASTs in userdlm.
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 382cd04889e1f05c428bc5f77aeb00e64e9c4db3
Author: Sunil Mushran <sunil.mushran at oracle.com>
Date: Thu Apr 1 10:19:58 2010 -0700
ocfs2: Use a separate masklog for AST and BASTs
Mainline commit 9b915181af0a99fe94ef0152e6a4ca9990c3b6d0
This patch adds a new masklog and uses it allow tracing ASTs and BASTs
in the dlmglue layer. This has been found to be very useful in debugging
cluster locking issues.
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit d7bd73a9e5b944d9bc2a78daae6e98c1cc0f0374
Author: Srinivas Eeda <srinivas.eeda at oracle.com>
Date: Thu Apr 1 10:19:48 2010 -0700
dlm: allow dlm do recovery during shutdown
Mainline commit bc9838c4d44a1713ab1bf24aa6675bc3a02b6a88
If a node down event happens while dlm shutdown in progress, dlm recovery
should be done before dlm is shutdown. We can't migrate unrecovered locks,
obviously. But dlm_reco_thread only does recovery if the dlm_state is
in DLM_CTXT_JOINED.
dlm_reco_thread should do recovery if dlm_state is in DLM_CTXT_JOINED or
DLM_CTXT_IN_SHUTDOWN.
Signed-off-by: Srinivas Eeda <srinivas.eeda at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 38e2643ba15888eec54d77163274c0ce6fd623af
Author: Tao Ma <tao.ma at oracle.com>
Date: Thu Apr 1 10:19:39 2010 -0700
ocfs2: Only bug out in direct io write for reflinked extent.
Mainline commit cbaee472f274ea9a98aabe47025f6e5551acadcb
In ocfs2_direct_IO_get_blocks, we only need to bug out
in case of we are going to write a recounted extent rec.
What a silly bug introduced by me!
Signed-off-by: Tao Ma <tao.ma at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
Cc: stable at kernel.org
commit ea9449efec929d6f973e589a747119eb77e6cb5b
Author: Coly Li <coly.li at suse.de>
Date: Thu Apr 1 10:19:29 2010 -0700
ocfs2: fix warning in ocfs2_file_aio_write()
Mainline commit 66b116c9d8f70baadf5b2145dddb35af222df041
This patch fixes a compiling warning in ocfs2_file_aio_write().
Signed-off-by: Coly Li <coly.li at suse.de>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit e9b67f6aa04ee3db57ffa9e1e88cd78ad2bf6f2d
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:19:19 2010 -0700
ocfs2_dlmfs: Enable the use of user cluster stacks.
Mainline commit cbe0e331fdbdb256943499358c75bc098a2134c1
Unlike ocfs2, dlmfs has no permanent storage. It can't store off a
cluster stack it is supposed to be using. So it can't specify the stack
name in ocfs2_cluster_connect().
Instead, we create ocfs2_cluster_connect_agnostic(), which simply uses
the stack that is currently enabled. This is find for dlmfs, which will
rely on the stack initialization.
We add the "stackglue" capability to dlmfs's capability list. This lets
userspace know dlmfs can be used with all cluster stacks.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit c05d97b71f88d42f6bdcade4c8fba0db9200eacc
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 13:46:08 2010 -0700
ocfs2_dlmfs: Use the stackglue.
Mainline commit 0016eedc4185a3cd7e578b027a6e69001b85d6c4
Rather than directly using o2dlm, dlmfs can now use the stackglue. This
allows it to use userspace cluster stacks and fs/dlm. This commit
forces o2cb for now. A latter commit will bump the protocol version and
allow non-o2cb stacks.
This is one big sed, really. LKM_xxMODE becomes DLM_LOCK_xx. LKM_flag
becomes DLM_LKF_flag.
We also learn to check that the LVB is valid before reading it. Any DLM
can lose the contents of the LVB during a complicated recovery. userdlm
should be checking this. Now it does. dlmfs will return 0 from read(2)
if the LVB was invalid.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 5a90432106ac6f30210145af5a0c643eaacc190c
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:19:01 2010 -0700
ocfs2_dlmfs: Don't honor truncate. The size of a dlmfs file is LVB_LEN
Mainline commit e8fce482f3702c1ad27c97b26db5022aa1fa64c7
We want folks using dlmfs to be able to use the LVB in places other than
just write(2)/read(2). By ignoring truncate requests, we allow 'echo
"contents" > /dlm/space/lockname' to work.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit b6b9d9d2063c136333d1a0b46e05891a1ca8c826
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:18:52 2010 -0700
ocfs2: Pass the locking protocol into ocfs2_cluster_connect().
Mainline commit 553b5eb91abd5f8e679d23ae547b92c589726814
Inside the stackglue, the locking protocol structure is hanging off of
the ocfs2_cluster_connection. This takes it one further; the locking
protocol is passed into ocfs2_cluster_connect(). Now different cluster
connections can have different locking protocols with distinct asts.
Note that all locking protocols have to keep their maximum protocol
version in lock-step.
With the protocol structure set in ocfs2_cluster_connect(), there is no
need for the stackglue to have a static pointer to a specific protocol
structure. We can change initialization to only pass in the maximum
protocol version.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 710f16e0aa2d5baa443e3aa7058be205ba24e682
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:18:43 2010 -0700
ocfs2: Remove the ast pointers from ocfs2_stack_plugins
Mainline commit e603cfb074e150736814ef093a411df32c02ba9f
With the full ocfs2_locking_protocol hanging off of the
ocfs2_cluster_connection, ast wrappers can get the ast/bast pointers
there. They don't need to get them from their plugin structure.
The user plugin still needs the maximum locking protocol version,
though. This changes the plugin structure so that it only holds the max
version, not the entire ocfs2_locking_protocol pointer.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 63f67d58f2eb52185971e9223740222cafa84d73
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:18:33 2010 -0700
ocfs2: Hang the locking proto on the cluster conn and use it in asts.
Mainline commit 110946c8fb23c1e1e23312afed0977ad4aa37c95
With the ocfs2_cluster_connection hanging off of the ocfs2_dlm_lksb, we
have access to it in the ast and bast wrapper functions. Attach the
ocfs2_locking_protocol to the conn.
Now, instead of refering to a static variable for ast/bast pointers, the
wrappers can look at the connection. This means different connections
can have different ast/bast pointers, and it reduces the need for the
static pointer.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 32c7c7249e2189fc1fc9313025407b7fbbacc987
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:18:24 2010 -0700
ocfs2: Attach the connection to the lksb
Mainline commit c0e4133851ed94c73ee3d34a2f2a245fcd0a60a1
We're going to want it in the ast functions, so we convert union
ocfs2_dlm_lksb to struct ocfs2_dlm_lksb and let it carry the connection.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit e5653b4c14175661cc3bde44b7fa118815d13344
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:18:16 2010 -0700
ocfs2: Pass lksbs back from stackglue ast/bast functions.
Mainline commit a796d2862aed8117acc9f470f3429a5ee852912e
The stackglue ast and bast functions tried to maintain the fiction that
their arguments were void pointers. In reality, stack_user.c had to
know that the argument was an ocfs2_lock_res in order to get the status
off of the lksb. That's ugly.
This changes stackglue to always pass the lksb as the argument to ast
and bast functions. The caller can always use container_of() to get the
ocfs2_lock_res or user_dlm_lock_res. The net effect to the caller is
zero. They still get back the lockres in their ast. stackglue gets
cleaner, and now can use the lksb itself.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 5c03632d663baa90bc3591a2775cb7856a21ed1b
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:18:06 2010 -0700
ocfs2_dlmfs: Move to its own directory
Mainline commit 34a9dd7e29e9129fec40c645a03f1bbbe810e771
We're going to remove the tie between ocfs2_dlmfs and o2dlm.
ocfs2_dlmfs doesn't belong in the fs/ocfs2/dlm directory anymore. Here
we move it to fs/ocfs2/dlmfs.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit ccedff19b9a494ef840d06b1bb99e94dc66a6a30
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:17:39 2010 -0700
ocfs2_dlmfs: Use poll() to signify BASTs.
Mainline commit 65b6f3403431cd43ef7b0dab679a50f770124a65
o2dlm's userspace filesystem is an easy way to use the DLM from
userspace. It is intentionally simple. For example, it does not allow
for asynchronous behavior or lock conversion. This is intentional to
keep the interface simple.
Because there is no asynchronous notification, there is no way for a
process holding a lock to know another node needs the lock. This is the
number one complaint of ocfs2_dlmfs users. Turns out, we can solve this
very easily. We add poll() support to ocfs2_dlmfs. When a BAST is
received, the lock's file descriptor will receive POLLIN.
This is trivial to implement. Userdlm already has an appropriate
waitqueue, and the lock knows when it is blocked.
We add the "bast" capability to tell userspace this is available.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
Acked-by: Mark Fasheh <mfasheh at suse.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 73b73c8b512040a7fab7b77b7707e4f3351fb37b
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:17:30 2010 -0700
ocfs2_dlmfs: Add capabilities parameter.
Mainline commit 14a437c2b67aeee2a989a5d9c7e19094355d2fed
Over time, dlmfs has added some features that were not part of the
initial ABI. Unfortunately, some of these features are not detectable
via standard usage. For example, Linux's default poll always returns
POLLIN, so there is no way for a caller of poll(2) to know when dlmfs
added poll support. Instead, we provide this list of new capabilities.
Capabilities is a read-only attribute. We do it as a module parameter
so we can discover it whether dlmfs is built in, loaded, or even not
loaded (via modinfo).
The ABI features are local to this machine's dlmfs mount. This is
distinct from the locking protocol, which is concerned with inter-node
interaction.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit bbeaa0938ffff3e2f43f5dc053c1f362ffa8c8fe
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:17:21 2010 -0700
ocfs2: Handle errors while setting external xattr values.
Mainline commit 399ff3a748cf4c8c853e96dd477153202636527b
ocfs2 can store extended attribute values as large as a single file. It
does this using a standard ocfs2 btree for the large value. However,
the previous code did not handle all error cases cleanly.
There are multiple problems to have.
1) We have trouble allocating space for a new xattr. This leaves us
with an empty xattr.
2) We overwrote an existing local xattr with a value root, and now we
have an error allocating the storage. This leaves us an empty xattr.
where there used to be a value. The value is lost.
3) We have trouble truncating a reused value. This leaves us with the
original entry pointing to the truncated original value. The value
is lost.
4) We have trouble extending the storage on a reused value. This leaves
us with the original value safely in place, but with more storage
allocated when needed.
This doesn't consider storing local xattrs (values that don't require a
btree). Those only fail when the journal fails.
Case (1) is easy. We just remove the xattr we added. We leak the
storage because we can't safely remove it, but otherwise everything is
happy. We'll print a warning about the leak.
Case (4) is easy. We still have the original value in place. We can
just leave the extra storage attached to this xattr. We return the
error, but the old value is untouched. We print a warning about the
storage.
Case (2) and (3) are hard because we've lost the original values. In
the old code, we ended up with values that could be partially read.
That's not good. Instead, we just wipe the xattr entry and leak the
storage. It stinks that the original value is lost, but now there isn't
a partial value to be read. We'll print a big fat warning.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 830b17e968a4ff0c56b142095f4abdd21a5f6603
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:17:11 2010 -0700
ocfs2: Set inline xattr entries with ocfs2_xa_set()
Mainline commit 139ffacebf5fe2cd9e2ae40d325a9661a679ad4f
ocfs2_xattr_ibody_set() is the only remaining user of
ocfs2_xattr_set_entry(). ocfs2_xattr_set_entry() actually does two
things: it calls ocfs2_xa_set(), and it initializes the inline xattrs.
Initializing the inline space really belongs in its own call.
We lift the initialization to ocfs2_xattr_ibody_init(), called from
ocfs2_xattr_ibody_set() only when necessary. Now
ocfs2_xattr_ibody_set() can call ocfs2_xa_set() directly.
ocfs2_xattr_set_entry() goes away.
Another nice fact is that ocfs2_init_dinode_xa_loc() can trust
i_xattr_inline_size.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 0b4a7558716020baf7996f59c283d730da23edf6
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:16:58 2010 -0700
ocfs2: Set xattr block entries with ocfs2_xa_set()
Mainline commit d3981544d7a4ed276966cdd58fe2f5d6e8a585d9
ocfs2_xattr_block_set() calls into ocfs2_xattr_set_entry() with just the
HAS_XATTR flag. Most of the machinery of ocfs2_xattr_set_entry() is
skipped. All that really happens other than the call to ocfs2_xa_set()
is making sure the HAS_XATTR flag is set on the inode.
But HAS_XATTR should be set when we also set di->i_xattr_loc. And
that's done in ocfs2_create_xattr_block(). So let's move it there, and
then ocfs2_xattr_block_set() can just call ocfs2_xa_set().
While we're there, ocfs2_create_xattr_block() can take the set_ctxt for
a smaller argument list. It also learns to set HAS_XATTR_FL, because it
knows for sure. ocfs2_create_empty_xatttr_block() in the reflink path
fakes a set_ctxt to call ocfs2_create_xattr_block().
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit fa824a0b1c20f502392817b05b2c8b8c3f46eafa
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:16:44 2010 -0700
ocfs2: Let ocfs2_xa_prepare_entry() do space checks.
Mainline commit c5d95df5f78312c879f3058059c98a08821897a5
ocfs2_xattr_set_in_bucket() doesn't need to do its own hacky space
checking. Let's let ocfs2_xa_prepare_entry() (via ocfs2_xa_set()) do
the more accurate work. Whenever it doesn't have space,
ocfs2_xattr_set_in_bucket() can try to get more space.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 16019a9b654d9408f9f74c460a1f7a8a6e550c40
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:16:35 2010 -0700
ocfs2: Gell into ocfs2_xa_set()
Mainline commit bca5e9bd1eb2a9422a2ff29e822a956310653754
ocfs2_xa_set() wraps the ocfs2_xa_prepare_entry()/ocfs2_xa_store_value()
logic. Both callers can now use the same routine. ocfs2_xa_remove()
moves directly into ocfs2_xa_set().
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 2b01cb586d86766df5fc9171501f29da5b87f115
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:16:27 2010 -0700
ocfs2: Allocation in ocfs2_xa_prepare_entry(), values in ocfs2_xa_store_value()
Mainline commit 73857ee0b548017f9632a0d0e6fe2dabbdc11d31
ocfs2_xa_prepare_entry() gets all the logic to add, remove, or modify
external value trees. Now, when it exits, the entry is ready to receive
a value of any size.
ocfs2_xa_remove() is added to handle the complete removal of an entry.
It truncates the external value tree before calling
ocfs2_xa_remove_entry().
ocfs2_xa_store_inline_value() becomes ocfs2_xa_store_value(). It can
store any value.
ocfs2_xattr_set_entry() loses all the allocation logic and just uses
these functions. ocfs2_xattr_set_value_outside() disappears.
ocfs2_xattr_set_in_bucket() uses these functions and makes
ocfs2_xattr_set_entry_in_bucket() obsolete. That goes away, as does
ocfs2_xattr_bucket_set_value_outside() and
ocfs2_xattr_bucket_value_truncate().
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 75cb2127c4bdca35018188f62a3f6bd8afbfb3ac
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:16:17 2010 -0700
ocfs2: Teach ocfs2_xa_loc how to do its own journal work
Mainline commit cf2bc809403ae48a4a2bb5cc551d2ec35f2e4a47
We're going to want to make sure our buffers get accessed and dirtied
correctly. So have the xa_loc do the work. This includes storing the
inode on ocfs2_xa_loc.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 1dcd92c47c574ab3c1cb3d389982bf4e8e9464a0
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:16:07 2010 -0700
ocfs2: Provide ocfs2_xa_fill_value_buf() for external value processing
Mainline commit 3fc12afa0cea5dc8845487b685165c89934ca1eb
We use the ocfs2_xattr_value_buf structure to manage external values.
It lets the value tree code do its work regardless of the containing
storage. ocfs2_xa_fill_value_buf() initializes a value buf from an
ocfs2_xa_loc entry.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 4cc5ca07b3244c5ae73f5f2b268b7c38deca2e88
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:15:59 2010 -0700
ocfs2: Handle value tree roots in ocfs2_xa_set_inline_value()
Mainline commit 9dc474005d0e34cf21d4b510f347e3942f24b021
Previously the xattr code would send in a fake value, containing a tree
root, to the function that installed name+value pairs. Instead, we pass
the real value to ocfs2_xa_set_inline_value(), and it notices that the
value cannot fit. Thus, it installs a tree root.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 92219eb220a8c4ea91bbb1ace60b12cb514dab3b
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:15:50 2010 -0700
ocfs2: Set the xattr name+value pair in one place
Mainline commit 69a3e539d083ac09aec92b8705b8ff2c2e5c810c
We create two new functions on ocfs2_xa_loc, ocfs2_xa_prepare_entry()
and ocfs2_xa_store_inline_value().
ocfs2_xa_prepare_entry() makes sure that the xl_entry field of
ocfs2_xa_loc is ready to receive an xattr. The entry will point to an
appropriately sized name+value region in storage. If an existing entry
can be reused, it will be. If no entry already exists, it will be
allocated. If there isn't space to allocate it, -ENOSPC will be
returned.
ocfs2_xa_store_inline_value() stores the data that goes into the 'value'
part of the name+value pair. For values that don't fit directly, this
stores the value tree root.
A number of operations are added to ocfs2_xa_loc_operations to support
these functions. This reflects the disparate behaviors of xattr blocks
and buckets.
With these functions, the overlapping ocfs2_xattr_set_entry_local() and
ocfs2_xattr_set_entry_normal() can be replaced with a single call
scheme.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 712dd05f201a90a849589f45db4e4327bd1b0197
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:15:36 2010 -0700
ocfs2: Wrap calculation of name+value pair size.
Mainline commit 199799a3609f6d5bb231a75c2e702afaac805431
An ocfs2 xattr entry stores the text name and value as a pair in the
storage area. Obviously names and values can be variable-sized. If a
value is too large for the entry storage, a tree root is stored instead.
The name+value pair is also padded.
Because of this, there are a million places in the code that do:
if (needs_external_tree(value_size)
namevalue_size = pad(name_size) + tree_root_size;
else
namevalue_size = pad(name_size) + pad(value_size);
Let's create some convenience functions to make the code more readable.
There are three forms. The first takes the raw sizes. The second takes
an ocfs2_xattr_info structure. The third takes an existing
ocfs2_xattr_entry.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 25149a68016e61a80340cd1b1249649b03dc1b11
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:15:18 2010 -0700
ocfs2: Add a name_len field to ocfs2_xattr_info.
Mainline commit 18853b95d1fb964b76c3393a12c4d861e7779460
Rather than calculating strlen all over the place, let's store the
name length directly on ocfs2_xattr_info.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit aceb74f44c51a56aacb1265e90d667d36bab54ab
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:15:08 2010 -0700
ocfs2: Prefix the member fields of struct ocfs2_xattr_info.
Mainline commit 6b240ff63c9dda93366c61c969b81ca22fe676ac
struct ocfs2_xattr_info is a useful structure describing an xattr
you'd like to set. Let's put prefixes on the member fields so it's
easier to read and use.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 1a795ed033a85c682ddaf9f614c93bdfb174d1a3
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:14:56 2010 -0700
ocfs2: Remove xattrs via ocfs2_xa_loc
Mainline commit bde1e5400a1b21ef47932ab00446c7361ff3c139
Add ocfs2_xa_remove_entry(), which will remove an xattr entry from its
storage via the ocfs2_xa_loc descriptor.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit daf08624ec3956360edb1b590f1de8d775ccb8e2
Author: Joel Becker <joel.becker at oracle.com>
Date: Thu Apr 1 10:14:46 2010 -0700
ocfs2: Introduce ocfs2_xa_loc
Mainline commit 11179f2c92cb025b1ff0b794f9714b3fb395855f
The ocfs2 extended attribute (xattr) code is very flexible. It can
store xattrs in the inode itself, in an external block, or in a tree of
data structures. This allows the number of xattrs to be bounded by the
filesystem size.
However, the code that manages each possible storage location is
different. Maintaining the ocfs2 xattr code requires changing each hunk
separately.
This patch is the start of a series introducing the ocfs2_xa_loc
structure. This structure wraps the on-disk details of an xattr
entry. The goal is that the generic xattr routines can use
ocfs2_xa_loc without knowing the underlying storage location.
This first pass merely implements the basic structure, initializing it,
and wiping the name+value pair of the entry.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit fc5cb771d8526642f55083d6ab184729dac96814
Author: Sunil Mushran <sunil.mushran at oracle.com>
Date: Thu Apr 1 10:14:34 2010 -0700
ocfs2: Add current->comm in trace output
Mainline commit 8545e03d82b6739461bbd60db7aba144f7dbe80f
Add current->comm to the standard mlog() output to help with debugging.
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 785843ad090ba8ef424818af4256ed2de2068139
Author: Wengang Wang <wen.gang.wang at oracle.com>
Date: Thu Apr 1 10:14:24 2010 -0700
ocfs2: Clean up the checks for CoW and direct I/O.
Mainline commit 96a1cc731adb28dc4feb71701091b80e67d486a7
When ocfs2 has to do CoW for refcounted extents, we disable direct I/O
and go through the buffered I/O path. This makes the combined check
easier to read.
Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit 14da8da6a80b0418ee43c733b3ad479b2105b14a
Author: Tiger Yang <tiger.yang at oracle.com>
Date: Thu Apr 1 10:14:12 2010 -0700
ocfs2: add extent block stealing for ocfs2 v5
Mainline commit b89c54282db0c8634a2d2dc200f196d571750ce5
This patch add extent block (metadata) stealing mechanism for
extent allocation. This mechanism is same as the inode stealing.
if no room in slot specific extent_alloc, we will try to
allocate extent block from the next slot.
Signed-off-by: Tiger Yang <tiger.yang at oracle.com>
Acked-by: Tao Ma <tao.ma at oracle.com>
Signed-off-by: Joel Becker <joel.becker at oracle.com>
commit a9b556ff31d2b36c3d776829ee019a431980daae
Author: Daniel Mack <daniel at caiaq.de>
Date: Thu Apr 1 10:14:00 2010 -0700
tree-wide: Assorted spelling fixes
Mainline commit 3ad2f3fbb961429d2aa627465ae4829758bc7e07
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.
Signed-off-by: Daniel Mack <daniel at caiaq.de>
Cc: Joe Perches <joe at perches.com>
Cc: Junio C Hamano <gitster at pobox.com>
Signed-off-by: Jiri Kosina <jkosina at suse.cz>
commit a887882401e9efc742dfd49e59bd76c713f33fde
Author: Tristan Ye <tristan.ye at oracle.com>
Date: Thu Apr 1 10:13:44 2010 -0700
Ocfs2: Handle new helper inode_newsize_ok from mainline
Mainline commit 5051f76883897ea3d3d034c92e7b84236da2ec57 introduced helper
inode_newsize_ok().
Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
Acked-by: Sunil Mushran <sunil.mushran at oracle.com>
-----------------------------------------------------------------------
Summary of changes:
Config.make.in | 1 +
Makefile | 3 +-
configure.in | 10 +
fs/Makefile | 2 +
fs/ocfs2/Makefile | 2 +-
fs/ocfs2/acl.c | 77 ++-
fs/ocfs2/alloc.c | 18 +-
fs/ocfs2/aops.c | 16 +-
fs/ocfs2/cluster/Makefile | 4 +
fs/ocfs2/cluster/masklog.c | 5 +
fs/ocfs2/cluster/masklog.h | 7 +-
fs/ocfs2/cluster/tcp.c | 4 +-
fs/ocfs2/dir.c | 39 +-
fs/ocfs2/dlm/Makefile | 21 +-
fs/ocfs2/dlm/dlmmaster.c | 4 +-
fs/ocfs2/dlm/dlmrecovery.c | 2 +-
fs/ocfs2/{dlm => dlmfs}/Makefile | 46 +-
fs/ocfs2/{dlm => dlmfs}/dlmfs.c | 125 ++-
fs/ocfs2/{dlm => dlmfs}/dlmfsver.c | 4 +-
fs/ocfs2/{dlm => dlmfs}/dlmfsver.h | 0
fs/ocfs2/{dlm => dlmfs}/kapi-default.h | 0
fs/ocfs2/{dlm => dlmfs}/userdlm.c | 308 +++---
fs/ocfs2/{dlm => dlmfs}/userdlm.h | 16 +-
fs/ocfs2/dlmglue.c | 286 +++--
fs/ocfs2/extent_map.c | 2 +-
fs/ocfs2/file.c | 33 +-
fs/ocfs2/inode.c | 21 +-
fs/ocfs2/ioctl.h | 6 +-
fs/ocfs2/kapi-default.h | 10 +
fs/ocfs2/localalloc.c | 12 +-
fs/ocfs2/locks.c | 2 +-
fs/ocfs2/namei.c | 80 +-
fs/ocfs2/ocfs2.h | 34 +-
fs/ocfs2/ocfs2_fs.h | 57 -
fs/ocfs2/ocfs2_ioctl.h | 79 ++
fs/ocfs2/ocfs2_lockingver.h | 2 +
fs/ocfs2/quota_global.c | 7 -
fs/ocfs2/quota_local.c | 2 +-
fs/ocfs2/refcounttree.c | 9 +-
fs/ocfs2/stack_o2cb.c | 37 +-
fs/ocfs2/stack_user.c | 49 +-
fs/ocfs2/stackglue.c | 98 +-
fs/ocfs2/stackglue.h | 95 +-
fs/ocfs2/suballoc.c | 300 ++++--
fs/ocfs2/suballoc.h | 6 +
fs/ocfs2/super.c | 10 +-
fs/ocfs2/xattr.c | 2186 +++++++++++++++++---------------
kapi-compat/include/fsattr.h | 46 +
kapi-compat/include/quotas.h | 22 +-
49 files changed, 2407 insertions(+), 1798 deletions(-)
copy fs/ocfs2/{dlm => dlmfs}/Makefile (68%)
rename fs/ocfs2/{dlm => dlmfs}/dlmfs.c (84%)
rename fs/ocfs2/{dlm => dlmfs}/dlmfsver.c (91%)
rename fs/ocfs2/{dlm => dlmfs}/dlmfsver.h (100%)
copy fs/ocfs2/{dlm => dlmfs}/kapi-default.h (100%)
rename fs/ocfs2/{dlm => dlmfs}/userdlm.c (67%)
rename fs/ocfs2/{dlm => dlmfs}/userdlm.h (90%)
create mode 100644 fs/ocfs2/ocfs2_ioctl.h
create mode 100644 kapi-compat/include/fsattr.h
hooks/post-receive
--
The ocfs2 filesystem version 1.6
More information about the Ocfs2-commits
mailing list