Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
The ONE Campaign to make poverty history

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 78 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

xfs_io



SYNOPSIS

       xfs_io [ -c cmd ] ... [ -p prog ] [ -r ] file


DESCRIPTION

       xfs_io is a debugging tool like xfs_db(8), but is aimed at
       examining the regular file IO path rather than the raw XFS
       volume itself.

       The options to xfs_io are:

       -c cmd    xfs_io  commands  may  be run interactively (the
                 default) or as arguments on  the  command  line.
                 Multiple  -c  arguments  may be given.  The com­
                 mands are run in the sequence  given,  then  the
                 program  exits.   This  is the mechanism used to
                 implement xfs_bmap(8).

       -p prog   Set the program name for prompts and some  error
                 messages, the default value is xfs_io.

       -r        Open file read-only, initially.


CONCEPTS

       xfs_io  always  maintains  one  current  open  file in the
       filesystem.  This is initially specified  on  the  command
       line, but alternate files can be specified later (one at a
       time - see the ``open'' command).

       xfs_io  commands  can  be  broken  up  into  two  distinct
       classes.   Most  commands  are for doing IO to the file in
       some way - reads, writes, or space  preallocation.   Other
       commands are for the navigation and display of data struc­
       tures relating to the  open  file  or  the  filesystem  it
       resides in.


COMMANDS

       Many  commands  have  extensive online help.  Use the help
       command for more details on any command.

       allocsp offset length
                 Allocates zeroed space for part of a file  using
                 the  XFS_IOC_ALLOCSP  system  call  described in
                 xfs(5).

       freesp offset length
                 Frees  space  for  part  of  a  file  using  the
                 XFS_IOC_FREESP  system call described in xfs(5).

       bmap [ -adlpv ] [ -n nx ]
                 Prints the block  mapping  for  the  open  file.
                 Refer to xfs_bmap(8) for complete documentation.

                 The  -c  option  creates  the file if it doesn't
                 already exist (O_CREAT).
                 The -d option opens for direct IO (O_DIRECT).
                 The -r option opens read-only (O_RDONLY).
                 The -s option opens for synchronous IO (O_SYNC).
                 The -t option truncates on open (O_TRUNC).
                 The  -x  option marks the file as a realtime XFS
                 file after opening it,  if  it  is  not  already
                 marked as such.

       pread     Reads  a range of bytes in a specified blocksize
                 from the given offset.
                 The -b option can be used to set  the  blocksize
                 into  which  the read(2) requests will be split.
                 The default blocksize is 4096 bytes.
                 The -v option will  dump  the  contents  of  the
                 buffer  after reading, by default only the count
                 of bytes actually read is dumped.

       pwrite    Writes a range of bytes in a specified blocksize
                 from the given offset.  The bytes written can be
                 either a set pattern or  read  in  from  another
                 file before writing.
                 The  -i option allows an input file to be speci­
                 fied as the source of the data to be written.
                 The -d option will cause direct IO, rather  than
                 the  usual  buffered IO, to be used when reading
                 the input file.
                 The -s options specifies the number of bytes  to
                 skip  from  the  start  of the input file before
                 starting to read.
                 The -b option can be used to set  the  blocksize
                 into  which  the read(2) requests will be split.
                 The default blocksize is  4096  bytes.   The  -S
                 option  is  used to set the (repeated) fill pat­
                 tern which is used when the data to write is not
                 coming  from  a  file.   The default buffer fill
                 pattern value is 0xcdcdcdcd.

       q         See the quit command.

       quit      Exit xfs_io.

       r         See the pread command.

       resblks [ blocks ]
                 Get and/or  set  count  of  reserved  filesystem
                 blocks    using   the   XFS_IOC_GET_RESBLKS   or
                 XFS_IOC_SET_RESBLKS system calls,  as  described
                 in xfs(5).  Note -- this can be useful for exer­
                 cising out of space behavior.

                 XFS_IOC_GETXATTR  system call from xfs(5) on the
                 currently open file.  If the -v option is speci­
                 fied,  the atime (last access), mtime (last mod­
                 ify), and ctime  (last  change)  timestamps  are
                 also displayed.

       statfs    Selected   statistics  from  statfs(2)  and  the
                 XFS_IOC_FSGEOMETRY system call  from  xfs(5)  on
                 the  filesystem  where  the  currently open file
                 resides.

       truncate offset
                 Truncates the current file at the  given  offset
                 using ftruncate(2).

       w         See the pwrite command.


SEE ALSO

       fdatasync(2),   fstat(2),   fstatfs(2),  fsync(2),  ftrun­
       cate(2),  mkfs.xfs(8),   open(2),   pread(2),   pwrite(2),
       xfs_bmap(8), xfs_db(8), xfs(5).

                                                        xfs_io(8)
  
Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.


Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.08 Seconds