Identifying sparse files using getattrlist()
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=0ILuzKYQaYelzXN/GaTjddFWZHjkRzgKFQXgTOjRP+A=; b=q9hMQ+2t0LJsGtOhrwe0h1AhApohVKAaKcAe4n0nk/o0+mSmD47l+Mqnqjlxu77rYR O14DKTTTojD5pXEjqJjFMDZMDtl39dp4n2DRqTjhZAoq0bElKM60o8w/TPv0UQYk7Ss7 zIJuoqaLqaF9hIMFtvu8eiaZgIeaSS1ez2k94= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Ba4kyfLMKseqAM5Blpd/zDZtE2Bb6yfamiLTQ+kMfAlcQsDcM3ZOWMo8zMXv9vnylR ksBRUIn0YRtntDMFkFdxuGM1YDB0xzglcwIud4J6b0nlxPeOITIzPxFg5I1aZJJPUPZr jvjVY34cDupRX+6X0IVkHektNqmdhxR8+daQQ= Hello All, I am trying to identify if a particular file is a sparse file using getattrlist() I am using this : attrList.fileattr = ATTR_FILE_TOTALSIZE | ATTR_FILE_ALLOCSIZE; According to the man page if ATTR_FILE_ALLOCSIZE < ATTR_FILE_TOTALSIZE the file is a sparse file. I created the sparse file using dd #dd if=/dev/zero of=sparse-file bs=1 count=0 seek=3g However, both AllocSize and TotalSize are returning the same size while actually AllocSize < TotalSize I am using UFS Thanks, Rohan _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
rohan a