sys: FspFsvolCreateTryFlushImage

This commit is contained in:
Bill Zissimopoulos
2016-01-20 15:42:33 -08:00
parent 8264ace57a
commit 12cec5dc22
5 changed files with 149 additions and 21 deletions

View File

@ -29,6 +29,7 @@
#define FSP_STATUS_PRIVATE_BIT (0x20000000)
#define FSP_STATUS_IOQ_POST (FSP_STATUS_PRIVATE_BIT | 0x0000)
#define FSP_STATUS_IOQ_POST_BEST_EFFORT (FSP_STATUS_PRIVATE_BIT | 0x0001)
#define FSP_STATUS_COMPLETED (FSP_STATUS_PRIVATE_BIT | 0x0002)
/* misc macros */
#define FSP_ALLOC_INTERNAL_TAG 'IpsF'
@ -43,6 +44,13 @@
#define DEBUGLOG(fmt, ...) ((void)0)
#endif
/* DEBUGLOGIRP */
#if DBG
#define DEBUGLOGIRP(Irp, Result) FspDebugLogIrp(Irp, Result)
#else
#define DEBUGLOGIRP(Irp, Result) ((void)0)
#endif
/* DEBUGBREAK */
#if DBG
extern __declspec(selectany) int fsp_bp = 1;
@ -590,6 +598,19 @@ const char *NtStatusSym(NTSTATUS Status);
const char *IrpMajorFunctionSym(UCHAR MajorFunction);
const char *IrpMinorFunctionSym(UCHAR MajorFunction, UCHAR MinorFunction);
const char *IoctlCodeSym(ULONG ControlCode);
static inline
VOID FspDebugLogIrp(PIRP Irp, NTSTATUS Result)
{
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
DEBUGLOG("IRP=%p, %s%c, %s%s, IoStatus=%s[%lld]",
Irp,
(const char *)&FspDeviceExtension(IrpSp->DeviceObject)->Kind,
Irp->RequestorMode == KernelMode ? 'K' : 'U',
IrpMajorFunctionSym(IrpSp->MajorFunction),
IrpMinorFunctionSym(IrpSp->MajorFunction, IrpSp->MinorFunction),
NtStatusSym(Result),
(LONGLONG)Irp->IoStatus.Information);
}
#endif
/* extern */