Re: regressions due to 64-bit ext4 directory cookies
[Posted March 25, 2013 by mkerrisk]
| From: |
| Anand Avati <anand.avati-Re5JQEeQqe8AvxtiuMwx3w-AT-public.gmane.org> |
| To: |
| "Theodore Ts'o" <tytso-3s7WtUTddSA-AT-public.gmane.org> |
| Subject: |
| Re: regressions due to 64-bit ext4 directory cookies |
| Date: |
| Wed, 13 Feb 2013 14:57:13 -0800 |
| Message-ID: |
| <CAFboF2z1akN_edrY_fT915xfehfHGioA2M=PSHv0Fp3rD-5v5A@mail.gmail.com> |
| Cc: |
| Bernd Schubert <bernd.schubert-mPn0NPGs4xGatNDF+KUbs4QuADTiUCJX-AT-public.gmane.org>,
linux-nfs-u79uwXL29TY76Z2rM5mHXA-AT-public.gmane.org, sandeen-H+wXaHxf7aLQT0dZR+AlfA-AT-public.gmane.org,
linux-ext4-u79uwXL29TY76Z2rM5mHXA-AT-public.gmane.org, gluster-devel-qX2TKyscuCcdnm+yROfE0A-AT-public.gmane.org |
| Archive-link: |
| Article, Thread
|
On Wed, Feb 13, 2013 at 2:47 PM, Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org> wrote:
> On Wed, Feb 13, 2013 at 05:41:41PM -0500, J. Bruce Fields wrote:
> > > What if we have an ioctl or a process personality flag where a broken
> > > application can tell the file system "I'm broken, please give me a
> > > degraded telldir/seekdir cookie"? That way we don't penalize programs
> > > that are doing the right thing, while providing some accomodation for
> > > programs who are abusing the telldir cookie.
> >
> > Yeah, if there's a simple way to do that, maybe it would be worth it.
>
> Doing this as an ioctl which gets called right after opendir, i.e
> (ignoring error checking):
>
> DIR *dir = opendir("/foo/bar/baz");
> ioctl(dirfd(dir), EXT4_IOC_DEGRADED_READDIR, 1);
> ...
>
> should be quite easy. It would be a very ext3/4 specific thing,
> though.
That would work, even though it would be ext3/4 specific. What is the
recommended programmatic way to detect if the file is on ext3/4 -- we would
not want to attempt that blindly on a non-ext3/4 FS as the numerical value
of EXT4_IOC_DEGRADED_READDIR might get interpreted in dangerous ways?
Avati
_______________________________________________
Gluster-devel mailing list
Gluster-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org
https://lists.nongnu.org/mailman/listinfo/gluster-devel
(
Log in to post comments)