* Memory alignment requirement for Direct/IO [not found] <1666985748.6396792.1556614132673.JavaMail.zimbra@redhat.com> @ 2019-04-30 9:01 ` Xiaoli Feng 2019-05-01 15:35 ` Steve French 0 siblings, 1 reply; 2+ messages in thread From: Xiaoli Feng @ 2019-04-30 9:01 UTC (permalink / raw) To: CIFS Hello, I setup samba server in upstream and mount it in local with cache=none,vers=3.11. Then test the Direct/IO function like this: fd=open(fname, O_DIRECT | O_RDWR | O_CREAT, 0666)) lseek(fd, 0, SEEK_SET); read(fd, buf, 1); For local filesystem such as XFS, "read" will be failed because XFS has 512Byte memory aligment for Direct/IO. But it's success for cifs. I don't know if it's expected. Could anybody tell me more about Direct/IO for cifs? Thanks. -- Best regards! XiaoLi Feng 冯小丽 Red Hat Software (Beijing) Co.,Ltd filesystem-qe Team IRC:xifeng,#channel: fs-qe Tel:+86-10-8388112 9/F, Raycom ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Memory alignment requirement for Direct/IO 2019-04-30 9:01 ` Memory alignment requirement for Direct/IO Xiaoli Feng @ 2019-05-01 15:35 ` Steve French 0 siblings, 0 replies; 2+ messages in thread From: Steve French @ 2019-05-01 15:35 UTC (permalink / raw) To: Xiaoli Feng; +Cc: CIFS I would expect direct i/o to work with unaligned reads over SMB3 mounts. Let me know if you see different behavior to any servers. On Tue, Apr 30, 2019 at 4:01 AM Xiaoli Feng <xifeng@redhat.com> wrote: > > Hello, > > I setup samba server in upstream and mount it in local with cache=none,vers=3.11. Then test > the Direct/IO function like this: > > fd=open(fname, O_DIRECT | O_RDWR | O_CREAT, 0666)) > lseek(fd, 0, SEEK_SET); > read(fd, buf, 1); > > For local filesystem such as XFS, "read" will be failed because XFS has 512Byte memory aligment > for Direct/IO. But it's success for cifs. I don't know if it's expected. Could anybody tell me > more about Direct/IO for cifs? > > Thanks. > > -- > Best regards! > XiaoLi Feng 冯小丽 > > Red Hat Software (Beijing) Co.,Ltd > filesystem-qe Team > IRC:xifeng,#channel: fs-qe > Tel:+86-10-8388112 > 9/F, Raycom -- Thanks, Steve ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-01 15:36 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1666985748.6396792.1556614132673.JavaMail.zimbra@redhat.com> 2019-04-30 9:01 ` Memory alignment requirement for Direct/IO Xiaoli Feng 2019-05-01 15:35 ` Steve French
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).