* Quick way to check if file is on nfs?
@ 2014-04-02 21:16 Ben Greear
2014-04-02 21:48 ` Trond Myklebust
0 siblings, 1 reply; 2+ messages in thread
From: Ben Greear @ 2014-04-02 21:16 UTC (permalink / raw)
To: linux-nfs@vger.kernel.org
Is there an efficient way to tell if a file we just opened is on
NFS vs local disk? We have reports of a bug where our program thinks
it has mounted nfs and starts writing to the nfs file system, but later
somehow local disk gets filled up instead. I'd like to detect when
we are no longer writing to the mount point so I can stop the test,
gather logs, etc.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Quick way to check if file is on nfs?
2014-04-02 21:16 Quick way to check if file is on nfs? Ben Greear
@ 2014-04-02 21:48 ` Trond Myklebust
0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2014-04-02 21:48 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-nfs@vger.kernel.org
On Apr 2, 2014, at 17:16, Ben Greear <greearb@candelatech.com> wrote:
> Is there an efficient way to tell if a file we just opened is on
> NFS vs local disk? We have reports of a bug where our program thinks
> it has mounted nfs and starts writing to the nfs file system, but later
> somehow local disk gets filled up instead. I'd like to detect when
> we are no longer writing to the mount point so I can stop the test,
> gather logs, etc.
>
> Thanks,
> Ben
Call fstatfs() on the file descriptor and look at the returned f_type?
Cheers
Trond
_________________________________
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@primarydata.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-02 21:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 21:16 Quick way to check if file is on nfs? Ben Greear
2014-04-02 21:48 ` Trond Myklebust
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.