Will open () a system call block on a remote file system?

I would like to know if the open () system call in the last Linux kernel will be blocked if the file system is mounted as a remote device, for example, the CEPH or NFS file system, and some kind of network failure of some kind?

+4
source share
2 answers

Yes. How much time depends on the speed (and state) of the uplink, but your process or thread is blocked until the remote operation is completed. NFS is a bit notorious, and some FUSE file systems handle locking for any file descriptor, but you will lock on open(), read()and write()often at the mercy of the network, another system.

Do not use O_NONBLOCKto get around it, or you are potentially reading or writing to a black hole (which just blocks in any case).

+2
source

Yes, a call open()may be blocked when you try to open a file in a remote file system if there is some kind of network failure.

, , ( ), , , , , , ( ).

+2

Source: https://habr.com/ru/post/1542037/


All Articles