pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


ms-nfs41client SRVOpen collapse support
Posted by Anonymous on Sat 19th Apr 2025 19:06
raw | new post

  1. #
  2. # ms-nfs41client SRVOpen collapse support
  3. # does NOT work because we do not know where we can get the |open_state| from
  4. #
  5. diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
  6. index d0cc36f..111ec82 100644
  7. --- a/sys/nfs41sys_openclose.c
  8. +++ b/sys/nfs41sys_openclose.c
  9. @@ -1079,8 +1079,35 @@ out:
  10.  NTSTATUS nfs41_CollapseOpen(
  11.      IN OUT PRX_CONTEXT RxContext)
  12.  {
  13. -    NTSTATUS status = STATUS_MORE_PROCESSING_REQUIRED;
  14. +    NTSTATUS status;
  15. +
  16.      DbgEn();
  17. +
  18. +    PMRX_SRV_OPEN SrvOpen = RxContext->pRelevantSrvOpen;
  19. +    PNFS41_FOBX nfs41_fobx = NULL;
  20. +
  21. +    RxContext->pFobx = (PMRX_FOBX)RxCreateNetFobx(RxContext, SrvOpen);
  22. +
  23. +    if (RxContext->pFobx == NULL) {
  24. +        status = STATUS_INSUFFICIENT_RESOURCES;
  25. +        goto out;
  26. +    }
  27. +
  28. +    RxContext->pFobx->OffsetOfNextEaToReturn = 1; /* FIXME: Why ? */
  29. +    status = STATUS_SUCCESS;
  30. +
  31. +    nfs41_fobx = (PNFS41_FOBX)(RxContext->pFobx)->Context;
  32. +    /*
  33. +     * FIXME: Where should we get the |open_state| from ? We either
  34. +     * need another fobx or a FileObject
  35. +     */
  36. +    nfs41_fobx->nfs41_open_state = NULL/*xxx->open_state*/;
  37. +    if (nfs41_fobx->sec_ctx.ClientToken == NULL) {
  38. +        status = nfs41_get_sec_ctx(SecurityImpersonation, &nfs41_fobx->sec_ctx);
  39. +        if (status)
  40. +            goto out;
  41. +    }
  42. +out:
  43.      DbgEx();
  44.      return status;
  45.  }
  46. @@ -1088,9 +1115,10 @@ NTSTATUS nfs41_CollapseOpen(
  47.  NTSTATUS nfs41_ShouldTryToCollapseThisOpen(
  48.      IN OUT PRX_CONTEXT RxContext)
  49.  {
  50. -    if (RxContext->pRelevantSrvOpen == NULL)
  51. -        return STATUS_SUCCESS;
  52. -    else return STATUS_MORE_PROCESSING_REQUIRED;
  53. +    NTSTATUS status = STATUS_SUCCESS;
  54. +    DbgEn();
  55. +    DbgEx();
  56. +    return status;
  57.  }
  58.  
  59.  NTSTATUS map_close_errors(

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at