search for: blkgetsize

Displaying 15 results from an estimated 15 matches for "blkgetsize".

Did you mean: blkgetsize64
2005 Jan 04
2
Re: Problem compiling syslinux-3.01
In my last post I pasted the last few line of the compile log for syslinux-3.02pre2. Here are the correct lines from my failed attempt to compile syslinux-3.01. Still the same error. make[1]: Leaving directory `/usr/src/syslinux-3.01/unix' make[1]: Entering directory `/usr/src/syslinux-3.01/extlinux' gcc -Wp,-MT,extlinux.o,-MMD,.extlinux.o.d -W -Wall -Wno-sign-compare
2002 Jun 26
1
using block devices as harddisks
...odev/harddrv.cc Wed Jun 26 09:42:51 2002 @@ -2779,6 +2779,20 @@ if (ret) { BX_PANIC(("fstat() returns error!")); } + if (S_ISBLK(stat_buf.st_mode)) + { +/* it's a block device. st_size will be 0, so set it to the correct size. */ + if (ioctl(fd_table[i],BLKGETSIZE,&(stat_buf.st_size))==-1) + BX_PANIC(("size of block device %s can't be read",pathname)); + if (stat_buf.st_size > (0x7ffffff/512)) + { + BX_ERROR(("size of disk image is too big, rounded down")); + stat_buf.st_size=0x7ffffe00; /* maximum...
2014 Jan 30
0
[PATCH 03/05] utils/mkdiskimage.in: Replaced the partly linux-specific file size determination by a sysseek() experiment
...if ( sysopen(OUTPUT, $file, O_RDWR, 0666) ) { $is_open = 1; - - if ( (@filestat = stat(OUTPUT)) && S_ISREG($filestat[2]) ) { - $len = $filestat[7] >> 9; - } elsif ( $is_linux && S_ISBLK($filestat[2]) ) { - $blksize = pack("L!", 0); - if ( ioctl(OUTPUT, $BLKGETSIZE, $blksize) == 0 ) { - $len = unpack("L!", $blksize); # In 512-byte sectors! - } - } + $len = sysseek(OUTPUT, 0, SEEK_END) >> 9; + sysseek(OUTPUT, 0, SEEK_SET); } if ( !$len ) {
2014 Jan 30
2
[PATCH 02/05] utils/mkdiskimage.in: With option -s: Avoid zeroizing the partition even if truncate() failed
utils/mkdiskimage.in: With option -s: Avoid zeroizing the partition even if truncate() failed. --- utils/mkdiskimage_patched_01.in 2014-01-30 20:43:02.000000000 +0100 +++ utils/mkdiskimage.in 2014-01-30 20:45:09.000000000 +0100 @@ -217,8 +217,11 @@ print OUTPUT "\x55\xaa"; $totalsize = $c*$h*$s; $tracks = $c*$h; -# If -s is given, try to simply use truncate... -unless
2001 Feb 28
2
Samba Compile problems
...LKROGET' redefined /usr/include/sys/mount.h:77: warning: this is the location of the previous definition /usr/include/linux/fs.h:147: warning: `BLKRRPART' redefined /usr/include/sys/mount.h:78: warning: this is the location of the previous definition /usr/include/linux/fs.h:148: warning: `BLKGETSIZE' redefined /usr/include/sys/mount.h:79: warning: this is the location of the previous definition /usr/include/linux/fs.h:149: warning: `BLKFLSBUF' redefined /usr/include/sys/mount.h:80: warning: this is the location of the previous definition /usr/include/linux/fs.h:150: warning: `BLKRASE...
2014 Jul 11
1
[PATCH 00/05] Mending for mkdiskimage
On 07/11/2014 12:33 AM, Thomas Schmitt wrote: > Technical side note: > It turned out that the lseek(2) function of NetBSD does not work > with SEEK_END as expected from the manual. libburn had to resort > to a binary search with try-and-error to determine device sizes. > I did not check perl's sysseek() whether it suffers from the > lseek(2) shortcomming, but i would expect
2014 Jul 10
4
[PATCH 1/5] utils/mkdiskimage.in: Option -s caused freshly created image files to be too small by a factor of 512.
--- utils/mkdiskimage.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/mkdiskimage.in b/utils/mkdiskimage.in index 533193a..a95a077 100644 --- a/utils/mkdiskimage.in +++ b/utils/mkdiskimage.in @@ -218,7 +218,7 @@ $totalsize = $c*$h*$s; $tracks = $c*$h; # If -s is given, try to simply use truncate... -unless ($opt{'s'} && truncate(OUTPUT,
2001 Oct 05
0
"File size limit exceeded" when running /sbin/mke2fs -j /dev/sdb1
...= 171 read(4, "", 4096) = 0 stat64(0x400307aa, 0xbffff43c) = 0 stat64(0xbffffa58, 0xbffff43c) = 0 close(4) = 0 munmap(0x40017000, 4096) = 0 open("/dev/sdb2", O_RDONLY|0x8000) = 4 ioctl(4, BLKGETSIZE, 0xbffff63c) = 0 close(4) = 0 brk(0x8053000) = 0x8053000 open("/dev/sdb2", O_RDWR|0x8000) = 4 time(NULL) = 1002263713 mmap2(NULL, 532480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,...
2014 Jan 30
1
[PATCH] Mending proposals for mkdiskimage
...if ( sysopen(OUTPUT, $file, O_RDWR, 0666) ) { $is_open = 1; - - if ( (@filestat = stat(OUTPUT)) && S_ISREG($filestat[2]) ) { - $len = $filestat[7] >> 9; - } elsif ( $is_linux && S_ISBLK($filestat[2]) ) { - $blksize = pack("L!", 0); - if ( ioctl(OUTPUT, $BLKGETSIZE, $blksize) == 0 ) { - $len = unpack("L!", $blksize); # In 512-byte sectors! - } - } + $len = sysseek(OUTPUT, 0, SEEK_END) >> 9; + sysseek(OUTPUT, 0, SEEK_SET); } if ( !$len ) { @@ -133,6 +130,7 @@ if ( $c == 0 && $file ne '' ) { } $c = $l...
2015 Jan 02
13
[PATCH 0/9] linux/syslinux: support ext2/3/4 device
Hello, Happy New Year! These patches make syslinux/linux support ext2/3/4, and it doesn't require the root privilege, I'd like to add a separate e2fs/syslinux, if that is more appropriate, it should be easy to do that. I put these patches on github so that you can easily get them in case you'd like to test them. (The repo's name is sys_tmp, which avoids confusing others, I will
2003 Dec 19
9
virtual disk/block-device problem
I am trying to write a script to handle setup of domains using virtual block devices for their root FS and have been unable to get the virtual devices to work with any sort of consistency. This is using xen-1.1.bk on Redhat 7.3 (I had to rebuild all the tool binaries to run on 7.3). Anyway, I would first like to make sure I am using the vd/vbd stuff correctly. Here is an example of the problem I
2020 Apr 22
0
slow performance on company production server I need help
...for additional space for backups, I was under the impression that sda, sdb, sdc, and sdd were the four disks on the raid controller card, but after unplugging the usb drive when running hdparm I am getting this: [root at daisy dev]# hdparm -tT /dev/sdb /dev/sdb: read() hit EOF - device too small ?BLKGETSIZE failed: Inappropriate ioctl for device BLKFLSBUF failed: Inappropriate ioctl for device [root at daisy dev]# ------------------------------------------------------ the 3ware controller shows all four disks still online with a status of ok: [root at daisy dev]# tw_cli /c8 show Unit? UnitType? St...
2013 Jul 15
21
[PATCH 00 of 21 RESEND] blktap3/drivers: Introduce tapdisk server.
This patch series copies the core of the tapdisk process from blktap2, with updates coming from blktap2.5. Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
2020 Apr 22
3
slow performance on company production server I need help
>> Hello Everyone, >> >> Since rebooting my Centos 6.10 Openvz server "daisy" yesterday, I am >> getting horrible system performance.? /var/log/messages is full of >> HDIO_GET_IDENTITY failed for /dev/sdb.? The latest entries look like >> this: >> >> Apr 22 08:51:32 daisy kernel: [141224.655699] CT: 1005: stopped >> Apr 22 08:55:04
2013 Apr 19
8
[PATCH 0 of 8] blktap3/libvhd: Introduce VHD library.
This patch series introduces the VHD library. It is based on the blktap2 one, with changes coming from the blktap2.5 one. Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>