Revert "[driver] storing fsattrs in netroot"
This reverts commit 7f338d871b.
now that each VNetRoot makes a MOUNT upcall and fetches fs attributes for its mount path, we no longer need to save fs attributes with the NetRoot
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
f6e02ff4a0
commit
7a6379b198
1 changed files with 6 additions and 14 deletions
|
|
@ -365,7 +365,6 @@ typedef struct _NFS41_NETROOT_EXTENSION {
|
||||||
BOOLEAN mounts_init;
|
BOOLEAN mounts_init;
|
||||||
FAST_MUTEX mountLock;
|
FAST_MUTEX mountLock;
|
||||||
nfs41_mount_list mounts;
|
nfs41_mount_list mounts;
|
||||||
FILE_FS_ATTRIBUTE_INFORMATION FsAttrs;
|
|
||||||
} NFS41_NETROOT_EXTENSION, *PNFS41_NETROOT_EXTENSION;
|
} NFS41_NETROOT_EXTENSION, *PNFS41_NETROOT_EXTENSION;
|
||||||
#define NFS41GetNetRootExtension(pNetRoot) \
|
#define NFS41GetNetRootExtension(pNetRoot) \
|
||||||
(((pNetRoot) == NULL) ? NULL : \
|
(((pNetRoot) == NULL) ? NULL : \
|
||||||
|
|
@ -3063,8 +3062,6 @@ NTSTATUS nfs41_CreateVNetRoot(
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
pVNetRootContext->timeout = Config->timeout;
|
pVNetRootContext->timeout = Config->timeout;
|
||||||
RtlCopyMemory(&pNetRootContext->FsAttrs, &pVNetRootContext->FsAttrs,
|
|
||||||
sizeof(pVNetRootContext->FsAttrs));
|
|
||||||
|
|
||||||
if (!found_existing_mount) {
|
if (!found_existing_mount) {
|
||||||
/* create a new mount entry and add it to the list */
|
/* create a new mount entry and add it to the list */
|
||||||
|
|
@ -3106,8 +3103,6 @@ NTSTATUS nfs41_CreateVNetRoot(
|
||||||
case RPCSEC_AUTHGSS_KRB5P:
|
case RPCSEC_AUTHGSS_KRB5P:
|
||||||
existing_mount->gssp_session = pVNetRootContext->session; break;
|
existing_mount->gssp_session = pVNetRootContext->session; break;
|
||||||
}
|
}
|
||||||
RtlCopyMemory(&pVNetRootContext->FsAttrs, &pNetRootContext->FsAttrs,
|
|
||||||
sizeof(pVNetRootContext->FsAttrs));
|
|
||||||
}
|
}
|
||||||
pNetRootContext->nfs41d_version = nfs41d_version;
|
pNetRootContext->nfs41d_version = nfs41d_version;
|
||||||
#ifdef DEBUG_MOUNT
|
#ifdef DEBUG_MOUNT
|
||||||
|
|
@ -3349,9 +3344,9 @@ BOOLEAN isOpen2Create(
|
||||||
|
|
||||||
BOOLEAN isFilenameTooLong(
|
BOOLEAN isFilenameTooLong(
|
||||||
PUNICODE_STRING name,
|
PUNICODE_STRING name,
|
||||||
PNFS41_NETROOT_EXTENSION pNetRootContext)
|
PNFS41_V_NET_ROOT_EXTENSION pVNetRootContext)
|
||||||
{
|
{
|
||||||
PFILE_FS_ATTRIBUTE_INFORMATION attrs = &pNetRootContext->FsAttrs;
|
PFILE_FS_ATTRIBUTE_INFORMATION attrs = &pVNetRootContext->FsAttrs;
|
||||||
LONG len = attrs->MaximumComponentNameLength, count = 1, i;
|
LONG len = attrs->MaximumComponentNameLength, count = 1, i;
|
||||||
PWCH p = name->Buffer;
|
PWCH p = name->Buffer;
|
||||||
for (i = 0; i < name->Length / 2; i++) {
|
for (i = 0; i < name->Length / 2; i++) {
|
||||||
|
|
@ -3547,7 +3542,7 @@ NTSTATUS check_nfs41_create_args(
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isFilenameTooLong(SrvOpen->pAlreadyPrefixedName, pNetRootContext)) {
|
if (isFilenameTooLong(SrvOpen->pAlreadyPrefixedName, pVNetRootContext)) {
|
||||||
status = STATUS_OBJECT_NAME_INVALID;
|
status = STATUS_OBJECT_NAME_INVALID;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
@ -4365,8 +4360,7 @@ NTSTATUS nfs41_QueryVolumeInformation(
|
||||||
|
|
||||||
/* on attribute queries for the root directory,
|
/* on attribute queries for the root directory,
|
||||||
* use cached volume attributes from mount */
|
* use cached volume attributes from mount */
|
||||||
if (is_root_directory(RxContext) ||
|
if (is_root_directory(RxContext)) {
|
||||||
pNetRootContext->FsAttrs.MaximumComponentNameLength != 0) {
|
|
||||||
PFILE_FS_ATTRIBUTE_INFORMATION attrs =
|
PFILE_FS_ATTRIBUTE_INFORMATION attrs =
|
||||||
(PFILE_FS_ATTRIBUTE_INFORMATION)RxContext->Info.Buffer;
|
(PFILE_FS_ATTRIBUTE_INFORMATION)RxContext->Info.Buffer;
|
||||||
DECLARE_CONST_UNICODE_STRING(FsName, FS_NAME);
|
DECLARE_CONST_UNICODE_STRING(FsName, FS_NAME);
|
||||||
|
|
@ -5314,8 +5308,6 @@ NTSTATUS check_nfs41_setattr_args(
|
||||||
FILE_INFORMATION_CLASS InfoClass = RxContext->Info.FileInformationClass;
|
FILE_INFORMATION_CLASS InfoClass = RxContext->Info.FileInformationClass;
|
||||||
__notnull PNFS41_V_NET_ROOT_EXTENSION pVNetRootContext =
|
__notnull PNFS41_V_NET_ROOT_EXTENSION pVNetRootContext =
|
||||||
NFS41GetVNetRootExtension(RxContext->pRelevantSrvOpen->pVNetRoot);
|
NFS41GetVNetRootExtension(RxContext->pRelevantSrvOpen->pVNetRoot);
|
||||||
__notnull PNFS41_NETROOT_EXTENSION pNetRootContext =
|
|
||||||
NFS41GetNetRootExtension(RxContext->pRelevantSrvOpen->pVNetRoot->pNetRoot);
|
|
||||||
|
|
||||||
if (pVNetRootContext->read_only) {
|
if (pVNetRootContext->read_only) {
|
||||||
print_error("check_nfs41_setattr_args: Read-only mount\n");
|
print_error("check_nfs41_setattr_args: Read-only mount\n");
|
||||||
|
|
@ -5348,7 +5340,7 @@ NTSTATUS check_nfs41_setattr_args(
|
||||||
#ifdef DEBUG_FILE_SET
|
#ifdef DEBUG_FILE_SET
|
||||||
DbgP("Attempting to rename to '%wZ'\n", &dst);
|
DbgP("Attempting to rename to '%wZ'\n", &dst);
|
||||||
#endif
|
#endif
|
||||||
if (isFilenameTooLong(&dst, pNetRootContext)) {
|
if (isFilenameTooLong(&dst, pVNetRootContext)) {
|
||||||
status = STATUS_OBJECT_NAME_INVALID;
|
status = STATUS_OBJECT_NAME_INVALID;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
@ -5367,7 +5359,7 @@ NTSTATUS check_nfs41_setattr_args(
|
||||||
#ifdef DEBUG_FILE_SET
|
#ifdef DEBUG_FILE_SET
|
||||||
DbgP("Attempting to add link as '%wZ'\n", &dst);
|
DbgP("Attempting to add link as '%wZ'\n", &dst);
|
||||||
#endif
|
#endif
|
||||||
if (isFilenameTooLong(&dst, pNetRootContext)) {
|
if (isFilenameTooLong(&dst, pVNetRootContext)) {
|
||||||
status = STATUS_OBJECT_NAME_INVALID;
|
status = STATUS_OBJECT_NAME_INVALID;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue