xfs
[Top] [All Lists]

How to feel the real time feature of XFS from userspace

To: xfs@xxxxxxxxxxx
Subject: How to feel the real time feature of XFS from userspace
From: harryxiyou <harryxiyou@xxxxxxxxx>
Date: Sat, 9 Nov 2013 13:23:48 +0800
Cc: zwu.kernel@xxxxxxxxx, Dave Chinner <david@xxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=JTCrixRjiZ+8YPIbRJ+YsJkjuxnXxmFOFFxfhg615KI=; b=T3LTR84JkpiS4c/lSG6H42ZKphA4jF8YTdaH986UAybZYv6Xh7lWjLDHsUnvd/7EEw rf/8Jcjq3Ijk679qO4SpGLohBoAnqaCWmgMYskS+eCAnhMmuRu5H2kKsjj4pFLNkqG74 Yh3sa34FZEbpY9k2XSZPJBg7S2tPBfyxAiDnsuysWMxFutJjteG8iReKBBzUQXApCNPN 8kDt+ddXZnd0QeXX4Wz9VFYe89qKpcCPZ862tJX8wrozMWgfEjfHLJosFRUYVROyMS31 yp91GksKZ4lZu5O/YNAnvO+B/xqkPlMEO9wJOGCsaHUH8LemgcombLp6UyilCYAErqEl IDKQ==
Hi all,

I have format block device with XFS as follows.

root@node2:~# mkfs.xfs -f -r rtdev=/dev/sda3 /dev/sda4

meta-data=/dev/sda4              isize=256    agcount=4, agsize=56122440 blks

         =                       sectsz=512   attr=2, projid32bit=0

data     =                       bsize=4096   blocks=224489757, imaxpct=25

         =                       sunit=0      swidth=0 blks

naming   =version 2              bsize=4096   ascii-ci=0

log      =internal log           bsize=4096   blocks=109614, version=2

         =                       sectsz=512   sunit=0 blks, lazy-count=1

realtime =/dev/sda3              extsz=4096   blocks=14865657,
rtextents=14865657


And I also write user-space codes as follows.

root@node2:~/test# cat xfs.c
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <xfs/xfs.h>
#include <xfs/xfs_fs.h>

int main(int argc, char **argv) {
int fd;
int xfs_ret = 0;

fd = open("./1", O_RDWR);
if (fd < 0) {
fprintf(stderr, "open error!\n");
return -1;
}
xfs_ret = xfsctl("./1", fd, XFS_IOC_FSGETXATTR, NULL);

return 0;
}


Now, I am wondering how to feel the real time feature of XFS from userspace?
Could anyone please give me some suggestions? Thanks in advance.


-- 
Thanks
Weiwei  Jia (Harry Wei)

<Prev in Thread] Current Thread [Next in Thread>