Skip to content

Commit

Permalink
Merge branch 'master' of http://github.com/openzfsonwindows/ZFSin
Browse files Browse the repository at this point in the history
  • Loading branch information
lundman committed Jun 13, 2018
2 parents 0e8eb5b + 47337b5 commit 8ffa9aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 6 additions & 4 deletions ZFSin/spl/include/sys/vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,12 @@ static inline int win_has_cached_data(struct vnode *vp)
vp->FileHeader.AllocationSize.QuadPart = P2ROUNDUP((sz), PAGE_SIZE); \
vp->FileHeader.FileSize.QuadPart = (sz); \
vp->FileHeader.ValidDataLength.QuadPart = (sz); \
ccfs.AllocationSize = vp->FileHeader.AllocationSize; \
ccfs.FileSize = vp->FileHeader.FileSize; \
ccfs.ValidDataLength = vp->FileHeader.ValidDataLength; \
CcSetFileSizes(fileObject, &ccfs); \
if (CcIsFileCached(fileObject)) { \
ccfs.AllocationSize = vp->FileHeader.AllocationSize; \
ccfs.FileSize = vp->FileHeader.FileSize; \
ccfs.ValidDataLength = vp->FileHeader.ValidDataLength; \
CcSetFileSizes(fileObject, &ccfs); \
} \
ObDereferenceObject(fileObject); \
} \
} while(0)
Expand Down
5 changes: 1 addition & 4 deletions ZFSin/zfs/module/zfs/zfs_vnops_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -1785,11 +1785,8 @@ NTSTATUS query_volume_information(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STA
RtlCopyMemory(ffai->FileSystemName, name.Buffer, space);
Irp->IoStatus.Information = FIELD_OFFSET(FILE_FS_ATTRIBUTE_INFORMATION, FileSystemName) + space;

Status = STATUS_SUCCESS;

if (space < zmo->name.Length)
Status = STATUS_BUFFER_OVERFLOW;
else
Status = STATUS_SUCCESS;
ASSERT(Irp->IoStatus.Information <= IrpSp->Parameters.QueryVolume.Length);
break;
case FileFsControlInformation:
Expand Down

0 comments on commit 8ffa9aa

Please sign in to comment.