git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'condvar'
[zfs.git]
/
module
/
zfs
/
zfs_ctldir.c
diff --git
a/module/zfs/zfs_ctldir.c
b/module/zfs/zfs_ctldir.c
index
01bf52f
..
41d3365
100644
(file)
--- a/
module/zfs/zfs_ctldir.c
+++ b/
module/zfs/zfs_ctldir.c
@@
-212,6
+212,7
@@
zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id,
mutex_enter(&zsb->z_znodes_lock);
list_insert_tail(&zsb->z_all_znodes, zp);
mutex_enter(&zsb->z_znodes_lock);
list_insert_tail(&zsb->z_all_znodes, zp);
+ zsb->z_nr_znodes++;
membar_producer();
mutex_exit(&zsb->z_znodes_lock);
membar_producer();
mutex_exit(&zsb->z_znodes_lock);
@@
-224,13
+225,13
@@
zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id,
* Lookup the inode with given id, it will be allocated if needed.
*/
static struct inode *
* Lookup the inode with given id, it will be allocated if needed.
*/
static struct inode *
-zfsctl_inode_lookup(zfs_sb_t *zsb, u
nsigned long
id,
+zfsctl_inode_lookup(zfs_sb_t *zsb, u
int64_t
id,
const struct file_operations *fops, const struct inode_operations *ops)
{
struct inode *ip = NULL;
while (ip == NULL) {
const struct file_operations *fops, const struct inode_operations *ops)
{
struct inode *ip = NULL;
while (ip == NULL) {
- ip = ilookup(zsb->z_sb, id);
+ ip = ilookup(zsb->z_sb,
(unsigned long)
id);
if (ip)
break;
if (ip)
break;
@@
-266,10
+267,14
@@
zfsctl_inode_inactive(struct inode *ip)
* therefore checks against a vfs_count of 2 instead of 1. This reference
* is removed when the ctldir is destroyed in the unmount. All other entities
* under the '.zfs' directory are created dynamically as needed.
* therefore checks against a vfs_count of 2 instead of 1. This reference
* is removed when the ctldir is destroyed in the unmount. All other entities
* under the '.zfs' directory are created dynamically as needed.
+ *
+ * Because the dynamically created '.zfs' directory entries assume the use
+ * of 64-bit inode numbers this support must be disabled on 32-bit systems.
*/
int
zfsctl_create(zfs_sb_t *zsb)
{
*/
int
zfsctl_create(zfs_sb_t *zsb)
{
+#if defined(CONFIG_64BIT)
ASSERT(zsb->z_ctldir == NULL);
zsb->z_ctldir = zfsctl_inode_alloc(zsb, ZFSCTL_INO_ROOT,
ASSERT(zsb->z_ctldir == NULL);
zsb->z_ctldir = zfsctl_inode_alloc(zsb, ZFSCTL_INO_ROOT,
@@
-278,6
+283,9
@@
zfsctl_create(zfs_sb_t *zsb)
return (ENOENT);
return (0);
return (ENOENT);
return (0);
+#else
+ return (EOPNOTSUPP);
+#endif /* CONFIG_64BIT */
}
/*
}
/*
@@
-912,8
+920,8
@@
zfsctl_lookup_objset(struct super_block *sb, uint64_t objsetid, zfs_sb_t **zsbp)
* race cannot occur to an expired mount point because
* we hold the zsb->z_ctldir_lock to prevent the race.
*/
* race cannot occur to an expired mount point because
* we hold the zsb->z_ctldir_lock to prevent the race.
*/
- sbp = sget(&zpl_fs_type, zfsctl_test_super,
- zfsctl_set_super, &id);
+ sbp =
zpl_
sget(&zpl_fs_type, zfsctl_test_super,
+ zfsctl_set_super,
0,
&id);
if (IS_ERR(sbp)) {
error = -PTR_ERR(sbp);
} else {
if (IS_ERR(sbp)) {
error = -PTR_ERR(sbp);
} else {
@@
-944,7
+952,7
@@
zfsctl_shares_lookup(struct inode *dip, char *name, struct inode **ipp,
if (zsb->z_shares_dir == 0) {
ZFS_EXIT(zsb);
if (zsb->z_shares_dir == 0) {
ZFS_EXIT(zsb);
- return (
-
ENOTSUP);
+ return (ENOTSUP);
}
error = zfs_zget(zsb, zsb->z_shares_dir, &dzp);
}
error = zfs_zget(zsb, zsb->z_shares_dir, &dzp);