Skip to content

Commit 29bd17a

Browse files
committed
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (31 commits) ocfs2: clean up bh null checks ocfs2: document access rules for blocked_lock_list configfs: file.c fix possible recursive locking configfs: dir.c fix possible recursive locking configfs: Remove EXPERIMENTAL ocfs2: bump version number ocfs2/dlm: Clear joining_node on hearbeat node down ocfs2: convert byte order of constant instead of variable ocfs2: Update default cluster timeouts ocfs2: printf fixes ocfs2: Use generic_file_llseek ocfs2: Safer read_inline_data() ocfs2: Silence false lockdep warnings [PATCH 2/2] ocfs2: cluster aware flock() [PATCH 1/2] ocfs2: add flock lock type ocfs2: Local alloc window size changeable via mount option ocfs2: Support commit= mount option ocfs2: Add missing permission checks [PATCH 2/2] ocfs2: Implement group add for online resize [PATCH 1/2] ocfs2: Add group extend for online resize ...
2 parents 2ba14a0 + 2fe5c1d commit 29bd17a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2005
-1592
lines changed

Documentation/filesystems/ocfs2.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Features which OCFS2 does not support yet:
3535
- Directory change notification (F_NOTIFY)
3636
- Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
3737
- POSIX ACLs
38-
- readpages / writepages (not user visible)
3938

4039
Mount options
4140
=============
@@ -62,3 +61,18 @@ data=writeback Data ordering is not preserved, data may be written
6261
preferred_slot=0(*) During mount, try to use this filesystem slot first. If
6362
it is in use by another node, the first empty one found
6463
will be chosen. Invalid values will be ignored.
64+
commit=nrsec (*) Ocfs2 can be told to sync all its data and metadata
65+
every 'nrsec' seconds. The default value is 5 seconds.
66+
This means that if you lose your power, you will lose
67+
as much as the latest 5 seconds of work (your
68+
filesystem will not be damaged though, thanks to the
69+
journaling). This default value (or any low value)
70+
will hurt performance, but it's good for data-safety.
71+
Setting it to 0 will have the same effect as leaving
72+
it at the default (5 seconds).
73+
Setting it to very large values will improve
74+
performance.
75+
localalloc=8(*) Allows custom localalloc size in MB. If the value is too
76+
large, the fs will silently revert it to the default.
77+
Localalloc is not enabled for local mounts.
78+
localflocks This disables cluster aware flock.

Documentation/ioctl-number.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ Code Seq# Include File Comments
138138
'm' 00-1F net/irda/irmod.h conflict!
139139
'n' 00-7F linux/ncp_fs.h
140140
'n' E0-FF video/matrox.h matroxfb
141+
'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2
141142
'p' 00-0F linux/phantom.h conflict! (OpenHaptics needs this)
142143
'p' 00-3F linux/mc146818rtc.h conflict!
143144
'p' 40-7F linux/nvram.h

fs/Kconfig

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,8 @@ config OCFS2_FS
440440
Tools web page: http://oss.oracle.com/projects/ocfs2-tools
441441
OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
442442

443-
Note: Features which OCFS2 does not support yet:
444-
- extended attributes
445-
- quotas
446-
- cluster aware flock
447-
- Directory change notification (F_NOTIFY)
448-
- Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
449-
- POSIX ACLs
450-
- readpages / writepages (not user visible)
443+
For more information on OCFS2, see the file
444+
<file:Documentation/filesystems/ocfs2.txt>.
451445

452446
config OCFS2_DEBUG_MASKLOG
453447
bool "OCFS2 logging support"
@@ -1028,8 +1022,8 @@ config HUGETLB_PAGE
10281022
def_bool HUGETLBFS
10291023

10301024
config CONFIGFS_FS
1031-
tristate "Userspace-driven configuration filesystem (EXPERIMENTAL)"
1032-
depends on SYSFS && EXPERIMENTAL
1025+
tristate "Userspace-driven configuration filesystem"
1026+
depends on SYSFS
10331027
help
10341028
configfs is a ram-based filesystem that provides the converse
10351029
of sysfs's functionality. Where sysfs is a filesystem-based

fs/configfs/dir.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static int populate_groups(struct config_group *group)
546546
* That said, taking our i_mutex is closer to mkdir
547547
* emulation, and shouldn't hurt.
548548
*/
549-
mutex_lock(&dentry->d_inode->i_mutex);
549+
mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD);
550550

551551
for (i = 0; group->default_groups[i]; i++) {
552552
new_group = group->default_groups[i];
@@ -1405,7 +1405,8 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys)
14051405
sd = configfs_sb->s_root->d_fsdata;
14061406
link_group(to_config_group(sd->s_element), group);
14071407

1408-
mutex_lock(&configfs_sb->s_root->d_inode->i_mutex);
1408+
mutex_lock_nested(&configfs_sb->s_root->d_inode->i_mutex,
1409+
I_MUTEX_PARENT);
14091410

14101411
name.name = group->cg_item.ci_name;
14111412
name.len = strlen(name.name);

fs/configfs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ int configfs_add_file(struct dentry * dir, const struct configfs_attribute * att
320320
umode_t mode = (attr->ca_mode & S_IALLUGO) | S_IFREG;
321321
int error = 0;
322322

323-
mutex_lock(&dir->d_inode->i_mutex);
323+
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_NORMAL);
324324
error = configfs_make_dirent(parent_sd, NULL, (void *) attr, mode, type);
325325
mutex_unlock(&dir->d_inode->i_mutex);
326326

fs/ocfs2/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@ ocfs2-objs := \
1919
ioctl.o \
2020
journal.o \
2121
localalloc.o \
22+
locks.o \
2223
mmap.o \
2324
namei.o \
25+
resize.o \
2426
slot_map.o \
2527
suballoc.o \
2628
super.o \
2729
symlink.o \
2830
sysfile.o \
2931
uptodate.o \
30-
ver.o \
31-
vote.o
32+
ver.o
3233

3334
obj-$(CONFIG_OCFS2_FS) += cluster/
3435
obj-$(CONFIG_OCFS2_FS) += dlm/

fs/ocfs2/alloc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4731,7 +4731,7 @@ int __ocfs2_flush_truncate_log(struct ocfs2_super *osb)
47314731

47324732
mutex_lock(&data_alloc_inode->i_mutex);
47334733

4734-
status = ocfs2_meta_lock(data_alloc_inode, &data_alloc_bh, 1);
4734+
status = ocfs2_inode_lock(data_alloc_inode, &data_alloc_bh, 1);
47354735
if (status < 0) {
47364736
mlog_errno(status);
47374737
goto out_mutex;
@@ -4753,7 +4753,7 @@ int __ocfs2_flush_truncate_log(struct ocfs2_super *osb)
47534753

47544754
out_unlock:
47554755
brelse(data_alloc_bh);
4756-
ocfs2_meta_unlock(data_alloc_inode, 1);
4756+
ocfs2_inode_unlock(data_alloc_inode, 1);
47574757

47584758
out_mutex:
47594759
mutex_unlock(&data_alloc_inode->i_mutex);
@@ -5077,7 +5077,7 @@ static int ocfs2_free_cached_items(struct ocfs2_super *osb,
50775077

50785078
mutex_lock(&inode->i_mutex);
50795079

5080-
ret = ocfs2_meta_lock(inode, &di_bh, 1);
5080+
ret = ocfs2_inode_lock(inode, &di_bh, 1);
50815081
if (ret) {
50825082
mlog_errno(ret);
50835083
goto out_mutex;
@@ -5118,7 +5118,7 @@ static int ocfs2_free_cached_items(struct ocfs2_super *osb,
51185118
ocfs2_commit_trans(osb, handle);
51195119

51205120
out_unlock:
5121-
ocfs2_meta_unlock(inode, 1);
5121+
ocfs2_inode_unlock(inode, 1);
51225122
brelse(di_bh);
51235123
out_mutex:
51245124
mutex_unlock(&inode->i_mutex);

0 commit comments

Comments
 (0)