All of lore.kernel.org
 help / color / mirror / Atom feed
* mkfs error: "existing superblock read failed: Inappropriate ioctl for device"
@ 2015-03-26 13:27 Alexander Tsvetkov
  2015-03-26 15:25 ` Brian Foster
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Tsvetkov @ 2015-03-26 13:27 UTC (permalink / raw)
  To: xfs

Hello,

I have the following error message: "existing superblock read failed: 
Inappropriate ioctl for device"
after attempt to make xfs image with "mkfs.xfs -f -m crc=1 -d 
file=1,name=xfs.fs,size=32m":

"meta-data=xfs.fs                 isize=256    agcount=2, agsize=4096 blks
          =                       sectsz=512   attr=2, projid32bit=1
          =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=8192, imaxpct=25
          =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal log           bsize=4096   blocks=853, version=2
          =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
existing superblock read failed: Inappropriate ioctl for device"

Filesystem is created and mounted as usually, xfs_repair passes, no 
messages in the system log.
Configuration: Fedora 20 x86_64 on vbox, kernel 4.0.0-rc5, xfsprogs 
version 3.2.2.

Thanks,
Alexander Tsvetkov


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mkfs error: "existing superblock read failed: Inappropriate ioctl for device"
  2015-03-26 13:27 mkfs error: "existing superblock read failed: Inappropriate ioctl for device" Alexander Tsvetkov
@ 2015-03-26 15:25 ` Brian Foster
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Foster @ 2015-03-26 15:25 UTC (permalink / raw)
  To: Alexander Tsvetkov; +Cc: xfs

On Thu, Mar 26, 2015 at 04:27:50PM +0300, Alexander Tsvetkov wrote:
> Hello,
> 
> I have the following error message: "existing superblock read failed:
> Inappropriate ioctl for device"
> after attempt to make xfs image with "mkfs.xfs -f -m crc=1 -d
> file=1,name=xfs.fs,size=32m":
> 
> "meta-data=xfs.fs                 isize=256    agcount=2, agsize=4096 blks
>          =                       sectsz=512   attr=2, projid32bit=1
>          =                       crc=0        finobt=0
> data     =                       bsize=4096   blocks=8192, imaxpct=25
>          =                       sunit=0      swidth=0 blks
> naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
> log      =internal log           bsize=4096   blocks=853, version=2
>          =                       sectsz=512   sunit=0 blks, lazy-count=1
> realtime =none                   extsz=4096   blocks=0, rtextents=0
> existing superblock read failed: Inappropriate ioctl for device"
> 
> Filesystem is created and mounted as usually, xfs_repair passes, no messages
> in the system log.
> Configuration: Fedora 20 x86_64 on vbox, kernel 4.0.0-rc5, xfsprogs version
> 3.2.2.
> 

This appears to come from zero_old_xfs_structures() where we try and
zero out any old data structures on the target device. pread() of the
superblock returns 0, because we open the target with O_CREAT|O_TRUNC if
it is a file (e.g., the file size is 0 so any reads will return 0). It's
not an error, so I suspect the error string there is stale from a
previous operation. Indeed, from strace:

...
ioctl(3, BLKDISCARD, {0, 7ffc2904a180}) = -1 ENOTTY (Inappropriate ioctl for device)
...
write(2, "existing superblock read failed:"..., 64existing superblock read failed: Inappropriate ioctl for device
) = 64
...

I'll send a patch in a bit, but the short of it is that this is
harmless. The side effect is we skip out of the function that zeroes old
metadata, but the file has already been truncated and thus effectively
zeroed out.

Brian

> Thanks,
> Alexander Tsvetkov
> 
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-26 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 13:27 mkfs error: "existing superblock read failed: Inappropriate ioctl for device" Alexander Tsvetkov
2015-03-26 15:25 ` Brian Foster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.