2 * logfile.c - NTFS kernel journal handling. Part of the Linux-NTFS project.
4 * Copyright (c) 2002-2004 Anton Altaparmakov.
6 * This program/include file is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as published
8 * by the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program/include file is distributed in the hope that it will be
12 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program (in the main directory of the Linux-NTFS
18 * distribution in the file COPYING); if not, write to the Free Software
19 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include <linux/types.h>
26 #include <linux/highmem.h>
27 #include <linux/buffer_head.h>
35 * ntfs_check_restart_page_header - check the page header for consistency
36 * @vi: $LogFile inode to which the restart page header belongs
37 * @rp: restart page header to check
38 * @pos: position in @vi at which the restart page header resides
40 * Check the restart page header @rp for consistency and return TRUE if it is
41 * consistent and FALSE otherwise.
43 * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
44 * require the full restart page.
46 static BOOL ntfs_check_restart_page_header(struct inode *vi,
47 RESTART_PAGE_HEADER *rp, s64 pos)
49 u32 logfile_system_page_size, logfile_log_page_size;
50 u16 usa_count, usa_ofs, usa_end, ra_ofs;
52 ntfs_debug("Entering.");
54 * If the system or log page sizes are smaller than the ntfs block size
55 * or either is not a power of 2 we cannot handle this log file.
57 logfile_system_page_size = le32_to_cpu(rp->system_page_size);
58 logfile_log_page_size = le32_to_cpu(rp->log_page_size);
59 if (logfile_system_page_size < NTFS_BLOCK_SIZE ||
60 logfile_log_page_size < NTFS_BLOCK_SIZE ||
61 logfile_system_page_size &
62 (logfile_system_page_size - 1) ||
63 logfile_log_page_size & (logfile_log_page_size - 1)) {
64 ntfs_error(vi->i_sb, "$LogFile uses unsupported page size.");
68 * We must be either at !pos (1st restart page) or at pos = system page
69 * size (2nd restart page).
71 if (pos && pos != logfile_system_page_size) {
72 ntfs_error(vi->i_sb, "Found restart area in incorrect "
73 "position in $LogFile.");
76 /* We only know how to handle version 1.1. */
77 if (sle16_to_cpu(rp->major_ver) != 1 ||
78 sle16_to_cpu(rp->minor_ver) != 1) {
79 ntfs_error(vi->i_sb, "$LogFile version %i.%i is not "
80 "supported. (This driver supports version "
81 "1.1 only.)", (int)sle16_to_cpu(rp->major_ver),
82 (int)sle16_to_cpu(rp->minor_ver));
85 /* Verify the size of the update sequence array. */
86 usa_count = 1 + (logfile_system_page_size >> NTFS_BLOCK_SIZE_BITS);
87 if (usa_count != le16_to_cpu(rp->usa_count)) {
88 ntfs_error(vi->i_sb, "$LogFile restart page specifies "
89 "inconsistent update sequence array count.");
92 /* Verify the position of the update sequence array. */
93 usa_ofs = le16_to_cpu(rp->usa_ofs);
94 usa_end = usa_ofs + usa_count * sizeof(u16);
95 if (usa_ofs < sizeof(RESTART_PAGE_HEADER) ||
96 usa_end > NTFS_BLOCK_SIZE - sizeof(u16)) {
97 ntfs_error(vi->i_sb, "$LogFile restart page specifies "
98 "inconsistent update sequence array offset.");
102 * Verify the position of the restart area. It must be:
103 * - aligned to 8-byte boundary,
104 * - after the update sequence array, and
105 * - within the system page size.
107 ra_ofs = le16_to_cpu(rp->restart_area_offset);
108 if (ra_ofs & 7 || ra_ofs < usa_end ||
109 ra_ofs > logfile_system_page_size) {
110 ntfs_error(vi->i_sb, "$LogFile restart page specifies "
111 "inconsistent restart area offset.");
115 * Only restart pages modified by chkdsk are allowed to have chkdsk_lsn
118 if (!ntfs_is_chkd_record(rp->magic) && sle64_to_cpu(rp->chkdsk_lsn)) {
119 ntfs_error(vi->i_sb, "$LogFile restart page is not modified "
120 "chkdsk but a chkdsk LSN is specified.");
128 * ntfs_check_restart_area - check the restart area for consistency
129 * @vi: $LogFile inode to which the restart page belongs
130 * @rp: restart page whose restart area to check
132 * Check the restart area of the restart page @rp for consistency and return
133 * TRUE if it is consistent and FALSE otherwise.
135 * This function assumes that the restart page header has already been
136 * consistency checked.
138 * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
139 * require the full restart page.
141 static BOOL ntfs_check_restart_area(struct inode *vi, RESTART_PAGE_HEADER *rp)
145 u16 ra_ofs, ra_len, ca_ofs;
148 ntfs_debug("Entering.");
149 ra_ofs = le16_to_cpu(rp->restart_area_offset);
150 ra = (RESTART_AREA*)((u8*)rp + ra_ofs);
152 * Everything before ra->file_size must be before the first word
153 * protected by an update sequence number. This ensures that it is
154 * safe to access ra->client_array_offset.
156 if (ra_ofs + offsetof(RESTART_AREA, file_size) >
157 NTFS_BLOCK_SIZE - sizeof(u16)) {
158 ntfs_error(vi->i_sb, "$LogFile restart area specifies "
159 "inconsistent file offset.");
163 * Now that we can access ra->client_array_offset, make sure everything
164 * up to the log client array is before the first word protected by an
165 * update sequence number. This ensures we can access all of the
166 * restart area elements safely. Also, the client array offset must be
167 * aligned to an 8-byte boundary.
169 ca_ofs = le16_to_cpu(ra->client_array_offset);
170 if (((ca_ofs + 7) & ~7) != ca_ofs ||
171 ra_ofs + ca_ofs > NTFS_BLOCK_SIZE - sizeof(u16)) {
172 ntfs_error(vi->i_sb, "$LogFile restart area specifies "
173 "inconsistent client array offset.");
177 * The restart area must end within the system page size both when
178 * calculated manually and as specified by ra->restart_area_length.
179 * Also, the calculated length must not exceed the specified length.
181 ra_len = ca_ofs + le16_to_cpu(ra->log_clients) *
182 sizeof(LOG_CLIENT_RECORD);
183 if (ra_ofs + ra_len > le32_to_cpu(rp->system_page_size) ||
184 ra_ofs + le16_to_cpu(ra->restart_area_length) >
185 le32_to_cpu(rp->system_page_size) ||
186 ra_len > le16_to_cpu(ra->restart_area_length)) {
187 ntfs_error(vi->i_sb, "$LogFile restart area is out of bounds "
188 "of the system page size specified by the "
189 "restart page header and/or the specified "
190 "restart area length is inconsistent.");
194 * The ra->client_free_list and ra->client_in_use_list must be either
195 * LOGFILE_NO_CLIENT or less than ra->log_clients or they are
196 * overflowing the client array.
198 if ((ra->client_free_list != LOGFILE_NO_CLIENT &&
199 le16_to_cpu(ra->client_free_list) >=
200 le16_to_cpu(ra->log_clients)) ||
201 (ra->client_in_use_list != LOGFILE_NO_CLIENT &&
202 le16_to_cpu(ra->client_in_use_list) >=
203 le16_to_cpu(ra->log_clients))) {
204 ntfs_error(vi->i_sb, "$LogFile restart area specifies "
205 "overflowing client free and/or in use lists.");
209 * Check ra->seq_number_bits against ra->file_size for consistency.
210 * We cannot just use ffs() because the file size is not a power of 2.
212 file_size = (u64)sle64_to_cpu(ra->file_size);
218 if (le32_to_cpu(ra->seq_number_bits) != 67 - fs_bits) {
219 ntfs_error(vi->i_sb, "$LogFile restart area specifies "
220 "inconsistent sequence number bits.");
223 /* The log record header length must be a multiple of 8. */
224 if (((le16_to_cpu(ra->log_record_header_length) + 7) & ~7) !=
225 le16_to_cpu(ra->log_record_header_length)) {
226 ntfs_error(vi->i_sb, "$LogFile restart area specifies "
227 "inconsistent log record header length.");
230 /* Dito for the log page data offset. */
231 if (((le16_to_cpu(ra->log_page_data_offset) + 7) & ~7) !=
232 le16_to_cpu(ra->log_page_data_offset)) {
233 ntfs_error(vi->i_sb, "$LogFile restart area specifies "
234 "inconsistent log page data offset.");
242 * ntfs_check_log_client_array - check the log client array for consistency
243 * @vi: $LogFile inode to which the restart page belongs
244 * @rp: restart page whose log client array to check
246 * Check the log client array of the restart page @rp for consistency and
247 * return TRUE if it is consistent and FALSE otherwise.
249 * This function assumes that the restart page header and the restart area have
250 * already been consistency checked.
252 * Unlike ntfs_check_restart_page_header() and ntfs_check_restart_area(), this
253 * function needs @rp->system_page_size bytes in @rp, i.e. it requires the full
254 * restart page and the page must be multi sector transfer deprotected.
256 static BOOL ntfs_check_log_client_array(struct inode *vi,
257 RESTART_PAGE_HEADER *rp)
260 LOG_CLIENT_RECORD *ca, *cr;
262 BOOL in_free_list, idx_is_first;
264 ntfs_debug("Entering.");
265 ra = (RESTART_AREA*)((u8*)rp + le16_to_cpu(rp->restart_area_offset));
266 ca = (LOG_CLIENT_RECORD*)((u8*)ra +
267 le16_to_cpu(ra->client_array_offset));
269 * Check the ra->client_free_list first and then check the
270 * ra->client_in_use_list. Check each of the log client records in
271 * each of the lists and check that the array does not overflow the
272 * ra->log_clients value. Also keep track of the number of records
273 * visited as there cannot be more than ra->log_clients records and
274 * that way we detect eventual loops in within a list.
276 nr_clients = le16_to_cpu(ra->log_clients);
277 idx = le16_to_cpu(ra->client_free_list);
280 for (idx_is_first = TRUE; idx != LOGFILE_NO_CLIENT_CPU; nr_clients--,
281 idx = le16_to_cpu(cr->next_client)) {
282 if (!nr_clients || idx >= le16_to_cpu(ra->log_clients))
284 /* Set @cr to the current log client record. */
286 /* The first log client record must not have a prev_client. */
288 if (cr->prev_client != LOGFILE_NO_CLIENT)
290 idx_is_first = FALSE;
293 /* Switch to and check the in use list if we just did the free list. */
295 in_free_list = FALSE;
296 idx = le16_to_cpu(ra->client_in_use_list);
302 ntfs_error(vi->i_sb, "$LogFile log client array is corrupt.");
307 * ntfs_check_and_load_restart_page - check the restart page for consistency
308 * @vi: $LogFile inode to which the restart page belongs
309 * @rp: restart page to check
310 * @pos: position in @vi at which the restart page resides
311 * @wrp: copy of the multi sector transfer deprotected restart page
313 * Check the restart page @rp for consistency and return TRUE if it is
314 * consistent and FALSE otherwise.
316 * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
317 * require the full restart page.
319 * If @wrp is not NULL, on success, *@wrp will point to a buffer containing a
320 * copy of the complete multi sector transfer deprotected page. On failure,
321 * *@wrp is undefined.
323 static BOOL ntfs_check_and_load_restart_page(struct inode *vi,
324 RESTART_PAGE_HEADER *rp, s64 pos, RESTART_PAGE_HEADER **wrp)
327 RESTART_PAGE_HEADER *trp;
331 ntfs_debug("Entering.");
332 /* Check the restart page header for consistency. */
333 if (!ntfs_check_restart_page_header(vi, rp, pos)) {
334 /* Error output already done inside the function. */
337 /* Check the restart area for consistency. */
338 if (!ntfs_check_restart_area(vi, rp)) {
339 /* Error output already done inside the function. */
342 ra = (RESTART_AREA*)((u8*)rp + le16_to_cpu(rp->restart_area_offset));
344 * Allocate a buffer to store the whole restart page so we can multi
345 * sector transfer deprotect it.
347 trp = ntfs_malloc_nofs(le32_to_cpu(rp->system_page_size));
349 ntfs_error(vi->i_sb, "Failed to allocate memory for $LogFile "
350 "restart page buffer.");
354 * Read the whole of the restart page into the buffer. If it fits
355 * completely inside @rp, just copy it from there. Otherwise map all
356 * the required pages and copy the data from them.
358 size = PAGE_CACHE_SIZE - (pos & ~PAGE_CACHE_MASK);
359 if (size >= le32_to_cpu(rp->system_page_size)) {
360 memcpy(trp, rp, le32_to_cpu(rp->system_page_size));
364 int have_read, to_read;
366 /* First copy what we already have in @rp. */
367 memcpy(trp, rp, size);
368 /* Copy the remaining data one page at a time. */
370 to_read = le32_to_cpu(rp->system_page_size) - size;
371 idx = (pos + size) >> PAGE_CACHE_SHIFT;
372 BUG_ON((pos + size) & ~PAGE_CACHE_MASK);
374 page = ntfs_map_page(vi->i_mapping, idx);
376 ntfs_error(vi->i_sb, "Error mapping $LogFile "
377 "page (index %lu).", idx);
380 size = min_t(int, to_read, PAGE_CACHE_SIZE);
381 memcpy((u8*)trp + have_read, page_address(page), size);
382 ntfs_unmap_page(page);
386 } while (to_read > 0);
388 /* Perform the multi sector transfer deprotection on the buffer. */
389 if (post_read_mst_fixup((NTFS_RECORD*)trp,
390 le32_to_cpu(rp->system_page_size))) {
391 ntfs_error(vi->i_sb, "Multi sector transfer error detected in "
392 "$LogFile restart page.");
395 /* Check the log client records for consistency. */
396 ret = ntfs_check_log_client_array(vi, trp);
409 * ntfs_ckeck_logfile - check in the journal if the volume is consistent
410 * @log_vi: struct inode of loaded journal $LogFile to check
412 * Check the $LogFile journal for consistency and return TRUE if it is
413 * consistent and FALSE if not.
415 * At present we only check the two restart pages and ignore the log record
418 * Note that the MstProtected flag is not set on the $LogFile inode and hence
419 * when reading pages they are not deprotected. This is because we do not know
420 * if the $LogFile was created on a system with a different page size to ours
421 * yet and mst deprotection would fail if our page size is smaller.
423 BOOL ntfs_check_logfile(struct inode *log_vi)
425 s64 size, pos, rstr1_pos, rstr2_pos;
426 ntfs_volume *vol = NTFS_SB(log_vi->i_sb);
427 struct address_space *mapping = log_vi->i_mapping;
428 struct page *page = NULL;
430 RESTART_PAGE_HEADER *rstr1_ph = NULL;
431 RESTART_PAGE_HEADER *rstr2_ph = NULL;
432 int log_page_size, log_page_mask, ofs;
433 BOOL logfile_is_empty = TRUE;
434 BOOL rstr1_found = FALSE;
435 BOOL rstr2_found = FALSE;
438 ntfs_debug("Entering.");
439 /* An empty $LogFile must have been clean before it got emptied. */
440 if (NVolLogFileEmpty(vol))
442 size = log_vi->i_size;
443 /* Make sure the file doesn't exceed the maximum allowed size. */
444 if (size > MaxLogFileSize)
445 size = MaxLogFileSize;
447 * Truncate size to a multiple of the page cache size or the default
448 * log page size if the page cache size is between the default log page
449 * log page size if the page cache size is between the default log page
450 * size and twice that.
452 if (PAGE_CACHE_SIZE >= DefaultLogPageSize && PAGE_CACHE_SIZE <=
453 DefaultLogPageSize * 2)
454 log_page_size = DefaultLogPageSize;
456 log_page_size = PAGE_CACHE_SIZE;
457 log_page_mask = log_page_size - 1;
458 log_page_bits = ffs(log_page_size) - 1;
459 size &= ~(log_page_size - 1);
461 * Ensure the log file is big enough to store at least the two restart
462 * pages and the minimum number of log record pages.
464 if (size < log_page_size * 2 || (size - log_page_size * 2) >>
465 log_page_bits < MinLogRecordPages) {
466 ntfs_error(vol->sb, "$LogFile is too small.");
470 * Read through the file looking for a restart page. Since the restart
471 * page header is at the beginning of a page we only need to search at
472 * what could be the beginning of a page (for each page size) rather
473 * than scanning the whole file byte by byte. If all potential places
474 * contain empty and uninitialzed records, the log file can be assumed
477 for (pos = 0; pos < size; pos <<= 1) {
478 pgoff_t idx = pos >> PAGE_CACHE_SHIFT;
479 if (!page || page->index != idx) {
481 ntfs_unmap_page(page);
482 page = ntfs_map_page(mapping, idx);
484 ntfs_error(vol->sb, "Error mapping $LogFile "
485 "page (index %lu).", idx);
489 kaddr = (u8*)page_address(page) + (pos & ~PAGE_CACHE_MASK);
491 * A non-empty block means the logfile is not empty while an
492 * empty block after a non-empty block has been encountered
495 if (!ntfs_is_empty_recordp(kaddr))
496 logfile_is_empty = FALSE;
497 else if (!logfile_is_empty)
500 * A log record page means there cannot be a restart page after
501 * this so no need to continue searching.
503 if (ntfs_is_rcrd_recordp(kaddr))
506 * A modified by chkdsk restart page means we cannot handle
509 if (ntfs_is_chkd_recordp(kaddr)) {
510 ntfs_error(vol->sb, "$LogFile has been modified by "
511 "chkdsk. Mount this volume in "
515 /* If not a restart page, continue. */
516 if (!ntfs_is_rstr_recordp(kaddr)) {
517 /* Skip to the minimum page size for the next one. */
519 pos = NTFS_BLOCK_SIZE >> 1;
522 /* We now know we have a restart page. */
528 ntfs_error(vol->sb, "Found more than two "
529 "restart pages in $LogFile.");
536 * Check the restart page for consistency and get a copy of the
537 * complete multi sector transfer deprotected restart page.
539 if (!ntfs_check_and_load_restart_page(log_vi,
540 (RESTART_PAGE_HEADER*)kaddr, pos,
541 !pos ? &rstr1_ph : &rstr2_ph)) {
542 /* Error output already done inside the function. */
546 * We have a valid restart page. The next one must be after
547 * a whole system page size as specified by the valid restart
551 pos = le32_to_cpu(rstr1_ph->system_page_size) >> 1;
554 ntfs_unmap_page(page);
557 if (logfile_is_empty) {
558 NVolSetLogFileEmpty(vol);
560 ntfs_debug("Done. ($LogFile is empty.)");
563 if (!rstr1_found || !rstr2_found) {
564 ntfs_error(vol->sb, "Did not find two restart pages in "
569 * The two restart areas must be identical except for the update
572 ofs = le16_to_cpu(rstr1_ph->usa_ofs);
573 if (memcmp(rstr1_ph, rstr2_ph, ofs) || (ofs += sizeof(u16),
574 memcmp((u8*)rstr1_ph + ofs, (u8*)rstr2_ph + ofs,
575 le32_to_cpu(rstr1_ph->system_page_size) - ofs))) {
576 ntfs_error(vol->sb, "The two restart pages in $LogFile do not "
582 /* All consistency checks passed. */
587 ntfs_unmap_page(page);
596 * ntfs_is_logfile_clean - check in the journal if the volume is clean
597 * @log_vi: struct inode of loaded journal $LogFile to check
599 * Analyze the $LogFile journal and return TRUE if it indicates the volume was
600 * shutdown cleanly and FALSE if not.
602 * At present we only look at the two restart pages and ignore the log record
603 * pages. This is a little bit crude in that there will be a very small number
604 * of cases where we think that a volume is dirty when in fact it is clean.
605 * This should only affect volumes that have not been shutdown cleanly but did
606 * not have any pending, non-check-pointed i/o, i.e. they were completely idle
607 * at least for the five seconds preceeding the unclean shutdown.
609 * This function assumes that the $LogFile journal has already been consistency
610 * checked by a call to ntfs_check_logfile() and in particular if the $LogFile
611 * is empty this function requires that NVolLogFileEmpty() is true otherwise an
612 * empty volume will be reported as dirty.
614 BOOL ntfs_is_logfile_clean(struct inode *log_vi)
616 ntfs_volume *vol = NTFS_SB(log_vi->i_sb);
618 RESTART_PAGE_HEADER *rp;
621 ntfs_debug("Entering.");
622 /* An empty $LogFile must have been clean before it got emptied. */
623 if (NVolLogFileEmpty(vol)) {
624 ntfs_debug("Done. ($LogFile is empty.)");
628 * Read the first restart page. It will be possibly incomplete and
629 * will not be multi sector transfer deprotected but we only need the
630 * first NTFS_BLOCK_SIZE bytes so it does not matter.
632 page = ntfs_map_page(log_vi->i_mapping, 0);
634 ntfs_error(vol->sb, "Error mapping $LogFile page (index 0).");
637 rp = (RESTART_PAGE_HEADER*)page_address(page);
638 if (!ntfs_is_rstr_record(rp->magic)) {
639 ntfs_error(vol->sb, "No restart page found at offset zero in "
640 "$LogFile. This is probably a bug in that "
641 "the $LogFile should have been consistency "
642 "checked before calling this function.");
645 ra = (RESTART_AREA*)((u8*)rp + le16_to_cpu(rp->restart_area_offset));
647 * If the $LogFile has active clients, i.e. it is open, and we do not
648 * have the RESTART_VOLUME_IS_CLEAN bit set in the restart area flags,
649 * we assume there was an unclean shutdown.
651 if (ra->client_in_use_list != LOGFILE_NO_CLIENT &&
652 !(ra->flags & RESTART_VOLUME_IS_CLEAN)) {
653 ntfs_debug("Done. $LogFile indicates a dirty shutdown.");
656 ntfs_unmap_page(page);
657 /* $LogFile indicates a clean shutdown. */
658 ntfs_debug("Done. $LogFile indicates a clean shutdown.");
661 ntfs_unmap_page(page);
666 * ntfs_empty_logfile - empty the contents of the $LogFile journal
667 * @log_vi: struct inode of loaded journal $LogFile to empty
669 * Empty the contents of the $LogFile journal @log_vi and return TRUE on
670 * success FALSE on error.
672 * This function assumes that the $LogFile journal has already been consistency
673 * checked by a call to ntfs_check_logfile() and that ntfs_is_logfile_clean()
674 * has been used to ensure that the $LogFile is clean.
676 BOOL ntfs_empty_logfile(struct inode *log_vi)
678 ntfs_volume *vol = NTFS_SB(log_vi->i_sb);
679 struct address_space *mapping;
682 ntfs_debug("Entering.");
683 if (NVolLogFileEmpty(vol))
685 mapping = log_vi->i_mapping;
686 end = (log_vi->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
687 for (idx = 0; idx < end; ++idx) {
691 /* Find or create the current page. (The page is locked.) */
692 page = grab_cache_page(mapping, idx);
693 if (unlikely(!page)) {
694 ntfs_error(vol->sb, "Insufficient memory to grab "
695 "$LogFile page (index %lu).", idx);
699 * Set all bytes in the page to 0xff. It doesn't matter if we
700 * go beyond i_size, because ntfs_writepage() will take care of
703 kaddr = (u8*)kmap_atomic(page, KM_USER0);
704 memset(kaddr, 0xff, PAGE_CACHE_SIZE);
705 flush_dcache_page(page);
706 kunmap_atomic(kaddr, KM_USER0);
708 * If the page has buffers, mark them uptodate since buffer
709 * state and not page state is definitive in 2.6 kernels.
711 if (page_has_buffers(page)) {
712 struct buffer_head *bh, *head;
714 bh = head = page_buffers(page);
716 set_buffer_uptodate(bh);
717 } while ((bh = bh->b_this_page) != head);
719 /* Now that buffers are uptodate, set the page uptodate, too. */
720 SetPageUptodate(page);
722 * Set the page and all its buffers dirty and mark the inode
723 * dirty, too. The VM will write the page later on.
725 set_page_dirty(page);
726 /* Finally unlock and release the page. */
728 page_cache_release(page);
730 /* We set the flag so we do not clear the log file again on remount. */
731 NVolSetLogFileEmpty(vol);