Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. MountSup.c
  5. Abstract:
  6. This module implements the support routines in Ntfs for reparse points.
  7. Author:
  8. Felipe Cabrera [cabrera] 30-Jun-1997
  9. Revision History:
  10. --*/
  11. #include "NtfsProc.h"
  12. #define Dbg DEBUG_TRACE_FSCTRL
  13. //
  14. // Define a tag for general pool allocations from this module
  15. //
  16. #undef MODULE_POOL_TAG
  17. #define MODULE_POOL_TAG ('PFtN')
  18. #ifdef ALLOC_PRAGMA
  19. #pragma alloc_text(PAGE, NtfsInitializeReparsePointIndex)
  20. #endif
  21. VOID
  22. NtfsInitializeReparsePointIndex (
  23. IN PIRP_CONTEXT IrpContext,
  24. IN PFCB Fcb,
  25. IN PVCB Vcb
  26. )
  27. /*++
  28. Routine Description:
  29. This routine opens the mount points index for the volume. If the index does not
  30. exist it is created and initialized.
  31. Arguments:
  32. Fcb - Pointer to Fcb for the object id file.
  33. Vcb - Volume control block for volume being mounted.
  34. Return Value:
  35. None
  36. --*/
  37. {
  38. UNICODE_STRING IndexName = CONSTANT_UNICODE_STRING( L"$R" );
  39. PAGED_CODE();
  40. NtfsAcquireExclusiveFcb( IrpContext, Fcb, NULL, 0 );
  41. try {
  42. NtOfsCreateIndex( IrpContext,
  43. Fcb,
  44. IndexName,
  45. CREATE_OR_OPEN,
  46. 0,
  47. COLLATION_NTOFS_ULONGS,
  48. NtOfsCollateUlongs,
  49. NULL,
  50. &Vcb->ReparsePointTableScb );
  51. } finally {
  52. NtfsReleaseFcb( IrpContext, Fcb );
  53. }
  54. }