This question already has an answer here:
I read this novel in french translation at least 40 years ago, but I am positive it was a translation from english.
The main character lives in a jungle of “poniques” (which are revealed at the end to be “hydroponiques”). The are lots and lots of flies. He looks for a mysterious place, almost legendary, supposedly free of flies, called, I think, “l’Avant” (“The Front” ? “Forwards” ? or maybe in english the name was “The Bow”?) but he does not know he is in a ship. This is his entire world.
He is afraid he might meet terrifying “Géants” (probably just Giants in english, but who knows) or worse, normal-looking people, just among the tallest and heaviest, who are supposed accomplices of the Géants. I think the name in french was “Hors-Venus” (“who came from Outside”) though he does not really know of an “Outside”. It is just kind of a legend, again.
The light in this world comes from everywhere, there is nothing like our “sun”, but curiously, lights are off 1/3 of the time, and the length of darkness correspond to a whole waking/sleeping natural cycle of people who therefore are awake in the dark every third such cycle.
I forgot most of the story, but at the end it turns out that they are humans, or rather descendants from humans trapped in a generation ship. After so many generations they grew smaller, their waking/sleeping natural cycle shortened to 8 hours (but the ship kept a 8 hours dark, 16 hours light cycle for all that time). Somehow the ship automatically went back to Earth orbit, but “normal” Earthlings did not want to absorb these returning small people, for which they had a name I forgot (and anyway, even if I remember, it would only be the french translation; I do remember it had to do with speed, because they moved faster than Earthlings). But they did want to help them in their ship. Sometimes they (the Géants) would come for a short time, (for repairs ?), sometimes the shortest and slimmest earthling would made long-term undercover stays (but of course they are still the tallest and heaviest among the people in she ship, the “Hors-Venus”).
This becomes clear to the reader, at some point rather late in the book, where the point-of-view shifts to the earthlings for the first time. But it not yet understood by the main character.
At the end the truth comes out for too many people in the ship. The Earthlings have no choice but to bring everyone back to Earth.