RE: Reading contents of a directory inside kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Pranay Srivastava [mailto:pranjas@xxxxxxxxx]
> Sent: Tuesday, July 07, 2015 12:36 PM
> To: Viswanath, Logeswari P (MCOU OSTL)
> Cc: linux-fsdevel@xxxxxxxxxxxxxxx
> Subject: Re: Reading contents of a directory inside kernel
> 
> On Tue, Jul 7, 2015 at 10:27 AM, Viswanath, Logeswari P (MCOU OSTL)
> <logeswari.pv@xxxxxx> wrote:
> > Sorry, I missed mentioning the kernel version: 2.6.32.
> >
> > What are the callers of vfs_readdir expected to do?
> >
> > I cannot use the generic callback fillonedir/filldir since they are defined in
> readdir.c and not exported for others.
> > Should the caller implement his/her own filler function?
> 
> Is this your own file system? If that's the case then yes you'll need to have a
> filler function.

No, I am not writing any file system.

> 
> >
> > Also, struct linux_dirent is defined in readdir.c. How can callers use this
> defintion?
> > Should the caller define it in again his/her kernel module?
> >
> > Please let me know whether my understanding is correct.
> 
> Can you provide more context what exactly are you doing.
> 
Here, I was referring to the 3rd argument to vfs_readdir API.

>From the implementation of getdents system call, I understood
that the 3rd argument to vfs_readdir is a pointer to struct getdents_callback 
which is defined in readdir.c. Hence was wondering how to use this data structure
in my kernel code.

- Logeswari.



��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux