Re: chattr/lsattr on XFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thanks for the reply. Looking at the source it seems that xfs supports the ioctl commands corresponding to chattr/lsattr from mail line kernel version 2.4.28.
( http://lxr.linux.no/source/fs/xfs/xfs_fs.h#L440)

439 /*
440 * ioctl commands that are used by Linux filesystems
441 */
442 #define XFS_IOC_GETXFLAGS _IOR('f', 1, long)
443 #define XFS_IOC_SETXFLAGS _IOW('f', 2, long)
444 #define XFS_IOC_GETVERSION _IOR('v', 1, long)
445
These are handled in the xfs_ioctl.c . Before 2.4.28, XFS does not support these ioctls and 

hence the error message.

thanks
-Manoj

On 11/29/06, scott nichols <deoryp@xxxxxxxxx> wrote:
Nathan asked a similar question, Forwarded message:

Hi Nathan

Checking for an ext2 filesystem in chattr/lsattr is imho a bad idea.
The reiserfs people have a patch for it.

http://marc.theaimsgroup.com/?l=reiserfs&m=100218431021888&w=2

chattr/lsattr should just print "filesystem unsupported" or such when the
ioctl faild for an fs which doesn't support it.


utz

Nathan Scott [nathans@xxxxxxx] wrote:
[...]
> The "Invalid argument" (EINVAL) message is coming from the XFS
> kernel code, because it receives a request for an ioctl which it

> doesn't know anything about (an ext2 ioctl in this case).
>
> This is arguably a buglet in e2fsprogs - in xfsprogs, wherever we
> issue an XFS-specific ioctl to an arbitary file descriptor we 1st

> check that it is indeed on an XFS filesystem (using fstatfs).
>
> But its just a matter of style/taste on the e2fsprogs maintainers
> part, I guess - Ted, below is a little patch which is the sort of

> thing we do in the XFS utilites before we issue any XFS-specific
> ioctl call. This checks the lsattr/chattr calls - there may well
> be several other ioctls I've missed in other parts of the code.

>
> cheers.
>


On 11/27/06, Manoj Awasthi < lkml.manoj@xxxxxxxxx > wrote:
Hi,

while doing a chattr/lsattr on a file in XFS file system, I get following error :-
chattr: Inappropriate ioctl for device while reading flags on <filename>

on strace, i found that chattr sends an ioctl command which is specific to EXT2. This
cmd is handled by ext2/ext3 and reiserfs but NOT by xfs.

can some one help by telling if this has been fixed in later versions ?
any pointer will be helpful ...

my kernel version: 2.4.20-20.7.XFS.1.3.1

thanks
-Manoj
--
What is important?  What you want to be true, or what is true?
---------------------------------------------------------------------------
http://awmanoj.blogspot.com




--
What is important?  What you want to be true, or what is true?
---------------------------------------------------------------------------
http://awmanoj.blogspot.com

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux