Ejemplo n.º 1
0
        private unsafe void WriteFile(long position, byte *p, int numberOf4Kb)
        {
            if (numberOf4Kb == 0)
            {
                return; // nothing to do
            }
            var nNumberOfBytesToWrite = (ulong)numberOf4Kb * (4 * Constants.Size.Kilobyte);

            using (_options.IoMetrics.MeterIoRate(_filename.FullPath, IoMetrics.MeterType.JournalWrite, (long)nNumberOfBytesToWrite))
            {
                Syscall.PwriteOrThrow(_fd, p, nNumberOfBytesToWrite, position * 4 * Constants.Size.Kilobyte, _filename.FullPath, "pwrite journal WriteFile");
            }
        }