Re: chattr/lsattr on XFS

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

 



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


[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