2 * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
33 * fs/xfs/linux/xfs_lrw.c (Linux Read Write stuff)
42 #include "xfs_trans.h"
47 #include "xfs_alloc.h"
48 #include "xfs_dmapi.h"
49 #include "xfs_quota.h"
50 #include "xfs_mount.h"
51 #include "xfs_alloc_btree.h"
52 #include "xfs_bmap_btree.h"
53 #include "xfs_ialloc_btree.h"
54 #include "xfs_btree.h"
55 #include "xfs_ialloc.h"
56 #include "xfs_attr_sf.h"
57 #include "xfs_dir_sf.h"
58 #include "xfs_dir2_sf.h"
59 #include "xfs_dinode.h"
60 #include "xfs_inode.h"
63 #include "xfs_rtalloc.h"
64 #include "xfs_error.h"
65 #include "xfs_itable.h"
71 #include "xfs_inode_item.h"
72 #include "xfs_buf_item.h"
73 #include "xfs_utils.h"
75 #include <linux/capability.h>
81 * xfs_iozero clears the specified range of buffer supplied,
82 * and marks all the affected blocks as valid and modified. If
83 * an affected block is not allocated, it will be allocated. If
84 * an affected block is not completely overwritten, and is not
85 * valid before the operation, it will be read from disk before
86 * being partially zeroed.
90 struct inode *ip, /* inode */
91 loff_t pos, /* offset in file */
92 size_t count, /* size of data to zero */
93 loff_t end_size) /* max file size to set */
97 struct address_space *mapping;
101 mapping = ip->i_mapping;
103 unsigned long index, offset;
105 offset = (pos & (PAGE_CACHE_SIZE -1)); /* Within page */
106 index = pos >> PAGE_CACHE_SHIFT;
107 bytes = PAGE_CACHE_SIZE - offset;
112 page = grab_cache_page(mapping, index);
117 status = mapping->a_ops->prepare_write(NULL, page, offset,
123 memset((void *) (kaddr + offset), 0, bytes);
124 flush_dcache_page(page);
125 status = mapping->a_ops->commit_write(NULL, page, offset,
130 if (pos > i_size_read(ip))
131 i_size_write(ip, pos < end_size ? pos : end_size);
137 page_cache_release(page);
145 ssize_t /* bytes read, or (-) error */
149 const struct iovec *iovp,
154 struct file *file = iocb->ki_filp;
162 int direct = (file->f_flags & O_DIRECT);
163 int invisible = (file->f_mode & FINVIS);
165 ip = XFS_BHVTOI(bdp);
166 vp = BHV_TO_VNODE(bdp);
168 vn_trace_entry(vp, "xfs_read", (inst_t *)__return_address);
170 XFS_STATS_INC(xfsstats.xs_read_calls);
172 /* START copy & waste from filemap.c */
173 for (seg = 0; seg < segs; seg++) {
174 const struct iovec *iv = &iovp[seg];
177 * If any segment has a negative length, or the cumulative
178 * length ever wraps negative then return -EINVAL.
181 if (unlikely((ssize_t)(size|iv->iov_len) < 0))
182 return XFS_ERROR(-EINVAL);
184 /* END copy & waste from filemap.c */
187 pb_target_t *target =
188 (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) ?
189 mp->m_rtdev_targp : mp->m_ddev_targp;
190 if ((*offset & target->pbr_smask) ||
191 (size & target->pbr_smask)) {
192 if (*offset == ip->i_d.di_size) {
195 return -XFS_ERROR(EINVAL);
199 n = XFS_MAXIOFFSET(mp) - *offset;
200 if ((n <= 0) || (size == 0))
206 if (XFS_FORCED_SHUTDOWN(mp)) {
210 /* OK so we are holding the I/O lock for the duration
211 * of the submission, then what happens if the I/O
212 * does not really happen here, but is scheduled
215 xfs_ilock(ip, XFS_IOLOCK_SHARED);
217 if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && !invisible) {
219 vrwlock_t locktype = VRWLOCK_READ;
221 error = XFS_SEND_DATA(mp, DM_EVENT_READ, bdp, *offset, size,
222 FILP_DELAY_FLAG(file), &locktype);
224 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
229 /* We need to deal with the iovec case seperately here */
230 ret = __generic_file_aio_read(iocb, iovp, segs, offset);
231 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
234 XFS_STATS_ADD(xfsstats.xs_read_bytes, ret);
237 xfs_ichgtime(ip, XFS_ICHGTIME_ACC);
257 int invisible = (filp->f_mode & FINVIS);
259 ip = XFS_BHVTOI(bdp);
260 vp = BHV_TO_VNODE(bdp);
262 vn_trace_entry(vp, "xfs_sendfile", (inst_t *)__return_address);
264 XFS_STATS_INC(xfsstats.xs_read_calls);
266 n = XFS_MAXIOFFSET(mp) - *offset;
267 if ((n <= 0) || (count == 0))
273 if (XFS_FORCED_SHUTDOWN(ip->i_mount))
276 xfs_ilock(ip, XFS_IOLOCK_SHARED);
277 if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && !invisible) {
278 vrwlock_t locktype = VRWLOCK_READ;
281 error = XFS_SEND_DATA(mp, DM_EVENT_READ, bdp, *offset, count,
282 FILP_DELAY_FLAG(filp), &locktype);
284 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
288 ret = generic_file_sendfile(filp, offset, count, actor, target);
289 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
291 XFS_STATS_ADD(xfsstats.xs_read_bytes, ret);
293 xfs_ichgtime(ip, XFS_ICHGTIME_ACC);
298 * This routine is called to handle zeroing any space in the last
299 * block of the file that is beyond the EOF. We do this since the
300 * size is being increased without writing anything to that block
301 * and we don't want anyone to read the garbage on the disk.
303 STATIC int /* error (positive) */
309 xfs_fsize_t end_size)
311 xfs_fileoff_t last_fsb;
316 int isize_fsb_offset;
318 xfs_bmbt_irec_t imap;
322 ASSERT(ismrlocked(io->io_lock, MR_UPDATE) != 0);
323 ASSERT(offset > isize);
327 isize_fsb_offset = XFS_B_FSB_OFFSET(mp, isize);
328 if (isize_fsb_offset == 0) {
330 * There are no extra bytes in the last block on disk to
336 last_fsb = XFS_B_TO_FSBT(mp, isize);
338 error = XFS_BMAPI(mp, NULL, io, last_fsb, 1, 0, NULL, 0, &imap,
345 * If the block underlying isize is just a hole, then there
346 * is nothing to zero.
348 if (imap.br_startblock == HOLESTARTBLOCK) {
352 * Zero the part of the last block beyond the EOF, and write it
353 * out sync. We need to drop the ilock while we do this so we
354 * don't deadlock when the buffer cache calls back to us.
356 XFS_IUNLOCK(mp, io, XFS_ILOCK_EXCL| XFS_EXTSIZE_RD);
357 loff = XFS_FSB_TO_B(mp, last_fsb);
358 lsize = XFS_FSB_TO_B(mp, 1);
360 zero_offset = isize_fsb_offset;
361 zero_len = mp->m_sb.sb_blocksize - isize_fsb_offset;
363 error = xfs_iozero(ip, loff + zero_offset, zero_len, end_size);
365 XFS_ILOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
371 * Zero any on disk space between the current EOF and the new,
372 * larger EOF. This handles the normal case of zeroing the remainder
373 * of the last block in the file and the unusual case of zeroing blocks
374 * out beyond the size of the file. This second case only happens
375 * with fixed size extents and when the system crashes before the inode
376 * size was updated but after blocks were allocated. If fill is set,
377 * then any holes in the range are filled and zeroed. If not, the holes
378 * are left alone as holes.
381 int /* error (positive) */
385 xfs_off_t offset, /* starting I/O offset */
386 xfs_fsize_t isize, /* current inode size */
387 xfs_fsize_t end_size) /* terminal inode size */
389 struct inode *ip = LINVFS_GET_IP(vp);
390 xfs_fileoff_t start_zero_fsb;
391 xfs_fileoff_t end_zero_fsb;
392 xfs_fileoff_t prev_zero_fsb;
393 xfs_fileoff_t zero_count_fsb;
394 xfs_fileoff_t last_fsb;
395 xfs_extlen_t buf_len_fsb;
396 xfs_extlen_t prev_zero_count;
400 xfs_bmbt_irec_t imap;
404 ASSERT(ismrlocked(io->io_lock, MR_UPDATE));
405 ASSERT(ismrlocked(io->io_iolock, MR_UPDATE));
410 * First handle zeroing the block on which isize resides.
411 * We only zero a part of that block so it is handled specially.
413 error = xfs_zero_last_block(ip, io, offset, isize, end_size);
415 ASSERT(ismrlocked(io->io_lock, MR_UPDATE));
416 ASSERT(ismrlocked(io->io_iolock, MR_UPDATE));
421 * Calculate the range between the new size and the old
422 * where blocks needing to be zeroed may exist. To get the
423 * block where the last byte in the file currently resides,
424 * we need to subtract one from the size and truncate back
425 * to a block boundary. We subtract 1 in case the size is
426 * exactly on a block boundary.
428 last_fsb = isize ? XFS_B_TO_FSBT(mp, isize - 1) : (xfs_fileoff_t)-1;
429 start_zero_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)isize);
430 end_zero_fsb = XFS_B_TO_FSBT(mp, offset - 1);
431 ASSERT((xfs_sfiloff_t)last_fsb < (xfs_sfiloff_t)start_zero_fsb);
432 if (last_fsb == end_zero_fsb) {
434 * The size was only incremented on its last block.
435 * We took care of that above, so just return.
440 ASSERT(start_zero_fsb <= end_zero_fsb);
441 prev_zero_fsb = NULLFILEOFF;
443 while (start_zero_fsb <= end_zero_fsb) {
445 zero_count_fsb = end_zero_fsb - start_zero_fsb + 1;
446 error = XFS_BMAPI(mp, NULL, io, start_zero_fsb, zero_count_fsb,
447 0, NULL, 0, &imap, &nimaps, NULL);
449 ASSERT(ismrlocked(io->io_lock, MR_UPDATE));
450 ASSERT(ismrlocked(io->io_iolock, MR_UPDATE));
455 if (imap.br_state == XFS_EXT_UNWRITTEN ||
456 imap.br_startblock == HOLESTARTBLOCK) {
458 * This loop handles initializing pages that were
459 * partially initialized by the code below this
460 * loop. It basically zeroes the part of the page
461 * that sits on a hole and sets the page as P_HOLE
462 * and calls remapf if it is a mapped file.
464 prev_zero_fsb = NULLFILEOFF;
466 start_zero_fsb = imap.br_startoff +
468 ASSERT(start_zero_fsb <= (end_zero_fsb + 1));
473 * There are blocks in the range requested.
474 * Zero them a single write at a time. We actually
475 * don't zero the entire range returned if it is
476 * too big and simply loop around to get the rest.
477 * That is not the most efficient thing to do, but it
478 * is simple and this path should not be exercised often.
480 buf_len_fsb = XFS_FILBLKS_MIN(imap.br_blockcount,
481 mp->m_writeio_blocks << 8);
483 * Drop the inode lock while we're doing the I/O.
484 * We'll still have the iolock to protect us.
486 XFS_IUNLOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
488 loff = XFS_FSB_TO_B(mp, start_zero_fsb);
489 lsize = XFS_FSB_TO_B(mp, buf_len_fsb);
491 error = xfs_iozero(ip, loff, lsize, end_size);
497 prev_zero_fsb = start_zero_fsb;
498 prev_zero_count = buf_len_fsb;
499 start_zero_fsb = imap.br_startoff + buf_len_fsb;
500 ASSERT(start_zero_fsb <= (end_zero_fsb + 1));
502 XFS_ILOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
509 XFS_ILOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
514 ssize_t /* bytes written, or (-) error */
518 const struct iovec *iovp,
523 struct file *file = iocb->ki_filp;
529 xfs_fsize_t isize, new_size;
530 xfs_fsize_t n, limit;
535 int direct = (file->f_flags & O_DIRECT);
536 int invisible = (file->f_mode & FINVIS);
540 XFS_STATS_INC(xfsstats.xs_write_calls);
542 vp = BHV_TO_VNODE(bdp);
543 vn_trace_entry(vp, "xfs_write", (inst_t *)__return_address);
544 xip = XFS_BHVTOI(bdp);
546 /* START copy & waste from filemap.c */
547 for (seg = 0; seg < segs; seg++) {
548 const struct iovec *iv = &iovp[seg];
551 * If any segment has a negative length, or the cumulative
552 * length ever wraps negative then return -EINVAL.
555 if (unlikely((ssize_t)(size|iv->iov_len) < 0))
556 return XFS_ERROR(-EINVAL);
558 /* END copy & waste from filemap.c */
563 io = &(xip->i_iocore);
566 xfs_check_frozen(mp, bdp, XFS_FREEZE_WRITE);
568 if (XFS_FORCED_SHUTDOWN(mp)) {
573 pb_target_t *target =
574 (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ?
575 mp->m_rtdev_targp : mp->m_ddev_targp;
577 if ((*offset & target->pbr_smask) ||
578 (size & target->pbr_smask)) {
579 return XFS_ERROR(-EINVAL);
581 iolock = XFS_IOLOCK_SHARED;
582 locktype = VRWLOCK_WRITE_DIRECT;
584 iolock = XFS_IOLOCK_EXCL;
585 locktype = VRWLOCK_WRITE;
588 xfs_ilock(xip, XFS_ILOCK_EXCL|iolock);
589 isize = xip->i_d.di_size;
590 limit = XFS_MAXIOFFSET(mp);
592 if (file->f_flags & O_APPEND)
598 xfs_iunlock(xip, XFS_ILOCK_EXCL|iolock);
605 new_size = *offset + size;
606 if (new_size > isize) {
607 io->io_new_size = new_size;
610 if ((DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_WRITE) &&
611 !invisible && !eventsent)) {
612 loff_t savedsize = *offset;
614 xfs_iunlock(xip, XFS_ILOCK_EXCL);
615 error = XFS_SEND_DATA(xip->i_mount, DM_EVENT_WRITE, bdp,
617 FILP_DELAY_FLAG(file), &locktype);
619 xfs_iunlock(xip, iolock);
622 xfs_ilock(xip, XFS_ILOCK_EXCL);
626 * The iolock was dropped and reaquired in XFS_SEND_DATA
627 * so we have to recheck the size when appending.
628 * We will only "goto start;" once, since having sent the
629 * event prevents another call to XFS_SEND_DATA, which is
630 * what allows the size to change in the first place.
632 if ((file->f_flags & O_APPEND) &&
633 savedsize != xip->i_d.di_size) {
634 *offset = isize = xip->i_d.di_size;
640 * On Linux, generic_file_write updates the times even if
641 * no data is copied in so long as the write had a size.
643 * We must update xfs' times since revalidate will overcopy xfs.
645 if (size && !invisible)
646 xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
649 * If the offset is beyond the size of the file, we have a couple
650 * of things to do. First, if there is already space allocated
651 * we need to either create holes or zero the disk or ...
653 * If there is a page where the previous size lands, we need
654 * to zero it out up to the new size.
657 if (!direct && (*offset > isize && isize)) {
658 error = xfs_zero_eof(BHV_TO_VNODE(bdp), io, *offset,
659 isize, *offset + size);
661 xfs_iunlock(xip, XFS_ILOCK_EXCL|iolock);
665 xfs_iunlock(xip, XFS_ILOCK_EXCL);
668 * If we're writing the file then make sure to clear the
669 * setuid and setgid bits if the process is not being run
670 * by root. This keeps people from modifying setuid and
674 if (((xip->i_d.di_mode & ISUID) ||
675 ((xip->i_d.di_mode & (ISGID | (IEXEC >> 3))) ==
676 (ISGID | (IEXEC >> 3)))) &&
677 !capable(CAP_FSETID)) {
678 error = xfs_write_clear_setuid(xip);
680 xfs_iunlock(xip, iolock);
687 xfs_inval_cached_pages(vp, &xip->i_iocore, *offset, 1, 1);
690 ret = generic_file_aio_write_nolock(iocb, iovp, segs, offset);
692 if ((ret == -ENOSPC) &&
693 DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_NOSPACE) && !invisible) {
695 xfs_rwunlock(bdp, locktype);
696 error = XFS_SEND_NAMESP(xip->i_mount, DM_EVENT_NOSPACE, bdp,
697 DM_RIGHT_NULL, bdp, DM_RIGHT_NULL, NULL, NULL,
698 0, 0, 0); /* Delay flag intentionally unused */
701 xfs_rwlock(bdp, locktype);
702 *offset = xip->i_d.di_size;
707 if (*offset > xip->i_d.di_size) {
708 xfs_ilock(xip, XFS_ILOCK_EXCL);
709 if (*offset > xip->i_d.di_size) {
710 struct inode *inode = LINVFS_GET_IP(vp);
712 xip->i_d.di_size = *offset;
713 i_size_write(inode, *offset);
714 xip->i_update_core = 1;
715 xip->i_update_size = 1;
717 xfs_iunlock(xip, XFS_ILOCK_EXCL);
721 xfs_rwunlock(bdp, locktype);
725 XFS_STATS_ADD(xfsstats.xs_write_bytes, ret);
727 /* Handle various SYNC-type writes */
728 if ((file->f_flags & O_SYNC) || IS_SYNC(file->f_dentry->d_inode)) {
731 * If we're treating this as O_DSYNC and we have not updated the
732 * size, force the log.
735 if (!(mp->m_flags & XFS_MOUNT_OSYNCISOSYNC)
736 && !(xip->i_update_size)) {
738 * If an allocation transaction occurred
739 * without extending the size, then we have to force
740 * the log up the proper point to ensure that the
741 * allocation is permanent. We can't count on
742 * the fact that buffered writes lock out direct I/O
743 * writes - the direct I/O write could have extended
744 * the size nontransactionally, then finished before
745 * we started. xfs_write_file will think that the file
746 * didn't grow but the update isn't safe unless the
747 * size change is logged.
749 * Force the log if we've committed a transaction
750 * against the inode or if someone else has and
751 * the commit record hasn't gone to disk (e.g.
752 * the inode is pinned). This guarantees that
753 * all changes affecting the inode are permanent
757 xfs_inode_log_item_t *iip;
761 if (iip && iip->ili_last_lsn) {
762 lsn = iip->ili_last_lsn;
763 xfs_log_force(mp, lsn,
764 XFS_LOG_FORCE | XFS_LOG_SYNC);
765 } else if (xfs_ipincount(xip) > 0) {
766 xfs_log_force(mp, (xfs_lsn_t)0,
767 XFS_LOG_FORCE | XFS_LOG_SYNC);
774 * O_SYNC or O_DSYNC _with_ a size update are handled
777 * If the write was synchronous then we need to make
778 * sure that the inode modification time is permanent.
779 * We'll have updated the timestamp above, so here
780 * we use a synchronous transaction to log the inode.
781 * It's not fast, but it's necessary.
783 * If this a dsync write and the size got changed
784 * non-transactionally, then we need to ensure that
785 * the size change gets logged in a synchronous
789 tp = xfs_trans_alloc(mp, XFS_TRANS_WRITE_SYNC);
790 if ((error = xfs_trans_reserve(tp, 0,
791 XFS_SWRITE_LOG_RES(mp),
793 /* Transaction reserve failed */
794 xfs_trans_cancel(tp, 0);
796 /* Transaction reserve successful */
797 xfs_ilock(xip, XFS_ILOCK_EXCL);
798 xfs_trans_ijoin(tp, xip, XFS_ILOCK_EXCL);
799 xfs_trans_ihold(tp, xip);
800 xfs_trans_log_inode(tp, xip, XFS_ILOG_CORE);
801 xfs_trans_set_sync(tp);
802 error = xfs_trans_commit(tp, 0, (xfs_lsn_t)0);
803 xfs_iunlock(xip, XFS_ILOCK_EXCL);
806 } /* (ioflags & O_SYNC) */
808 xfs_rwunlock(bdp, locktype);
813 * All xfs metadata buffers except log state machine buffers
814 * get this attached as their b_bdstrat callback function.
815 * This is so that we can catch a buffer
816 * after prematurely unpinning it to forcibly shutdown the filesystem.
819 xfs_bdstrat_cb(struct xfs_buf *bp)
823 mp = XFS_BUF_FSPRIVATE3(bp, xfs_mount_t *);
824 if (!XFS_FORCED_SHUTDOWN(mp)) {
825 pagebuf_iorequest(bp);
828 xfs_buftrace("XFS__BDSTRAT IOERROR", bp);
830 * Metadata write that didn't get logged but
831 * written delayed anyway. These aren't associated
832 * with a transaction, and can be ignored.
834 if (XFS_BUF_IODONE_FUNC(bp) == NULL &&
835 (XFS_BUF_ISREAD(bp)) == 0)
836 return (xfs_bioerror_relse(bp));
838 return (xfs_bioerror(bp));
844 xfs_bmap(bhv_desc_t *bdp,
848 page_buf_bmap_t *pbmapp,
851 xfs_inode_t *ip = XFS_BHVTOI(bdp);
852 xfs_iocore_t *io = &ip->i_iocore;
854 ASSERT((ip->i_d.di_mode & IFMT) == IFREG);
855 ASSERT(((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != 0) ==
856 ((ip->i_iocore.io_flags & XFS_IOCORE_RT) != 0));
858 return xfs_iomap(io, offset, count, flags, pbmapp, npbmaps);
862 * Wrapper around bdstrat so that we can stop data
863 * from going to disk in case we are shutting down the filesystem.
864 * Typically user data goes thru this path; one of the exceptions
869 struct xfs_mount *mp,
873 if (!XFS_FORCED_SHUTDOWN(mp)) {
874 /* Grio redirection would go here
875 * if (XFS_BUF_IS_GRIO(bp)) {
878 pagebuf_iorequest(bp);
882 xfs_buftrace("XFSBDSTRAT IOERROR", bp);
883 return (xfs_bioerror_relse(bp));
887 * If the underlying (data/log/rt) device is readonly, there are some
888 * operations that cannot proceed.
891 xfs_dev_is_read_only(
895 if (xfs_readonly_buftarg(mp->m_ddev_targp) ||
896 xfs_readonly_buftarg(mp->m_logdev_targp) ||
897 (mp->m_rtdev_targp && xfs_readonly_buftarg(mp->m_rtdev_targp))) {
899 "XFS: %s required on read-only device.", message);
901 "XFS: write access unavailable, cannot proceed.");